-
-
Notifications
You must be signed in to change notification settings - Fork 128
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
feat(mainwindow): update saving logic & detect text change #44
Conversation
Hi ouuan |
Yes lot of code was inherited from my old editor. Which was for personal and fun use! I will tr making it more organised !! |
Something should be changed in favor of |
What? |
I will fix it. Left a comment here for:
|
When your work is done, mention me to merge this work! |
1. fix auto-save nullptr 2. use closeChangedConfirm for opening a file 3. different messages when saving via different ways
It sometimes crashes when request is received, but I haven't found the reason.
Application terminates because it thinks that no window is visible. Read this problem and in the problem itself is the answer. Basically what you have to do is call Read this answer https://stackoverflow.com/questions/5116459/problem-with-hidden-qmainwindow-application-crashes-after-qmessagebox-is-displa |
The bug still happens: int main(int argc, char* argv[]) {
QApplication a(argc, argv);
a.setQuitOnLastWindowClosed(false);
QStringList args = a.arguments();
QString filePath = args.size() > 1 ? args[1]: "";
MainWindow w(filePath);
w.show();
return a.exec();
} |
How about this: open a new session when it's an unchanged temporary buffer (i.e. unsaved, the content is exactly the template), otherwise don't open a new session. |
Open a new session when it's an unchanged temporary buffer (i.e. unsaved, the content is exactly the template), otherwise don't open a new session.
It looks good to me now, you can merge it after checking again. |
After i merge it today, i will release a pre-release version, |
It didn't crash when I tested it, and in this version, there is no message box opened in the backstage. |
This fixes the second part of #23.
It's a big change, I'm not so sure that there aren't any mistakes. Please check it carefully.
BTW, the code reuse is terrible. There are too many copy pastings, especially the 3 inputs, 3 outputs, 3 runners part.