Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

If you don't install the clang-format,the code will be cleared when you use the code format. #195

Closed
bakabaka9405 opened this issue Mar 12, 2020 · 7 comments
Labels
bug Something isn't working

Comments

@bakabaka9405
Copy link

No description provided.

@bakabaka9405 bakabaka9405 added the bug Something isn't working label Mar 12, 2020
@ouuan
Copy link
Member

ouuan commented Mar 12, 2020

Please follow the template.

@ouuan
Copy link
Member

ouuan commented Mar 12, 2020

I can't reproduce it on my machine, so your steps to reproduce and your environment are important.

@ouuan
Copy link
Member

ouuan commented Mar 12, 2020

The template:

**Describe the bug**

<!-- A clear and concise description of what the bug is. -->

**To Reproduce**

<!-- Steps to reproduce the behavior. -->

**Screenshots**

<!-- If applicable, add screenshots to help explain your problem. -->

**Environment**

<!-- Your environment is usually important for finding the cause of the bug. -->
<!-- You can get the CP Editor version by clicking `Help`->`Build Info` in the GUI. -->

 - OS: [e.g. Windows 10 / Ubuntu 18.04]
 - CP Editor Version: [e.g. 6.0.2]

**Additional context**

<!-- Add any other context about the problem here. -->

@coder3101
Copy link
Member

@WYWFlash Yes this does happen. On windows, try removing the clang-format from path and you can see that it deletes the code, you can however undo it.

@ouuan
Copy link
Member

ouuan commented Mar 12, 2020

I've found the reason, QProcess::exitCode() is invalid when the process is not finished, I checked only the QProcess::exitCode() but not whether it has finished, thus made an undefined behavior, and result in this bug.

ouuan added a commit that referenced this issue Mar 12, 2020
This fixes #195.

`QProcess::exitCode()` is invalid when the process is not finished,
I checked only the `QProcess::exitCode()` but not whether it has
finished, thus made an undefined behavior, and result in this bug.
@ouuan ouuan closed this as completed in 4cef091 Mar 12, 2020
ouuan added a commit that referenced this issue Mar 12, 2020
@ouuan
Copy link
Member

ouuan commented May 3, 2020

@allcontributors add @WYWFlash as a contributor for bug report.

@allcontributors
Copy link
Contributor

@ouuan

I've put up a pull request to add @WYWFlash! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants