Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix(appwindow.cpp): change competitive companion logic Use the competitive companion logic introduced in 22af606 and 1b1058a (don't open new tabs). * style: format codes * fix & refactor(openfile): use openFile() for opening files Use AppWindow::openFile() for opening files. Thus fix bug of opening files via command line arguments / drag & drop. Duplicate files were not detected when opening via these two ways before. * feat(appwindow.cpp): show file path in window title * feat: change to the tab while close confirming * fix(appwindow.cpp): change window title after closing all tabs * fix(appwindow): move openFile() to private * refactor(appwindow.cpp): use openFile() for new tab * fix: fix bugs when all tabs are closed Segment fault in the following situations are fixed: 1. all tabs are closed, apply settings in preference window 2. all tabs are closed, received a competitive companion request After fixing, if all tabs are closed and a competitive companion request is received, a new tab will be opened for it. * feat: use "untitled" instead of "Unsaved file" This is the same as many other text editors, for example, Sublime Text. "Unsaved file" is a little confusing, it may be understood as "file with unsaved changes". * feat & refactor: add Save All and refactor codes * fix: fix a segmentation fault To reproduce the segmentation fault: 1. open the editor 2. open a new tab (then there are two tabs, and the current tab is the second one) 3. close the first tab If you switch to the first tab and close the second one, everything works well. It's caused by not updated windowIndex. It's fixed by updating windowsIndex in onTabChanged(). * feat(appwindow.cpp): make tabs movable * refactor: use pointer in signal and tabWidget->indexOf()
- Loading branch information
Showing
9 changed files
with
177 additions
and
166 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.