- fix: editor's modified state not correctly initiated
- fix: project's modified state not correctly initiated
This commit is contained in:
parent
88ac399b4e
commit
deabf1e847
Binary file not shown.
|
@ -2791,12 +2791,12 @@ Are you really want to continue?</source>
|
|||
<message>
|
||||
<location filename="mainwindow.ui" line="1703"/>
|
||||
<source>Open Folder in Explorer</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>在浏览器中打开</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.ui" line="1712"/>
|
||||
<source>Open In Terminal</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>在终端中打开</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="98"/>
|
||||
|
@ -2975,33 +2975,33 @@ Are you really want to continue?</source>
|
|||
<message>
|
||||
<location filename="mainwindow.cpp" line="1479"/>
|
||||
<source>Rename File</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>重命名文件</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="1487"/>
|
||||
<location filename="mainwindow.cpp" line="1506"/>
|
||||
<source>Add Folder</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>添加文件夹</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="1503"/>
|
||||
<source>New folder</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>新文件夹</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="1507"/>
|
||||
<source>Folder name:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>文件夹:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="1521"/>
|
||||
<source>Rename Folder</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>重命名</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="1529"/>
|
||||
<source>Remove Folder</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>删除文件夹</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="1612"/>
|
||||
|
@ -3647,24 +3647,24 @@ Are you really want to continue?</source>
|
|||
<message>
|
||||
<location filename="project.cpp" line="1848"/>
|
||||
<source>File exists</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>文件已存在</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="project.cpp" line="1849"/>
|
||||
<source>File '%1' already exists. Delete it now?</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>文件'%1'已存在。是否删除?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="project.cpp" line="1867"/>
|
||||
<location filename="project.cpp" line="1887"/>
|
||||
<source>Remove failed</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>删除失败</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="project.cpp" line="1868"/>
|
||||
<location filename="project.cpp" line="1888"/>
|
||||
<source>Failed to remove file '%1'</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>无法删除文件'%1'</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
|
|
|
@ -2003,7 +2003,7 @@ void MainWindow::closeEvent(QCloseEvent *event) {
|
|||
}
|
||||
|
||||
if (mProject) {
|
||||
mProject = nullptr;
|
||||
closeProject(false);
|
||||
}
|
||||
|
||||
delete mEditorList;
|
||||
|
@ -2991,7 +2991,9 @@ void MainWindow::on_actionOpen_Containing_Folder_triggered()
|
|||
if (editor) {
|
||||
QFileInfo info(editor->filename());
|
||||
if (!info.path().isEmpty()) {
|
||||
QDesktopServices::openUrl(info.path());
|
||||
QDesktopServices::openUrl(
|
||||
QUrl("file:///"+
|
||||
includeTrailingPathDelimiter(info.path()),QUrl::TolerantMode));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3293,7 +3295,8 @@ void MainWindow::on_actionProject_Open_Folder_In_Explorer_triggered()
|
|||
{
|
||||
if (!mProject)
|
||||
return;
|
||||
QDesktopServices::openUrl(mProject->directory());
|
||||
QDesktopServices::openUrl(
|
||||
QUrl("file:///"+includeTrailingPathDelimiter(mProject->directory()),QUrl::TolerantMode));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -29,9 +29,10 @@ Project::Project(const QString &filename, const QString &name, QObject *parent)
|
|||
&EditorList::getContentFromOpenedEditor,pMainWindow->editorList(),
|
||||
std::placeholders::_1, std::placeholders::_2));
|
||||
resetCppParser(mParser);
|
||||
if (name == DEV_INTERNAL_OPEN)
|
||||
if (name == DEV_INTERNAL_OPEN) {
|
||||
open();
|
||||
else {
|
||||
mModified = false;
|
||||
} else {
|
||||
mName = name;
|
||||
SimpleIni ini;
|
||||
ini.SetValue("Project","filename", toByteArray(extractRelativePath(directory(),mFilename)));
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
|
||||
SynEdit::SynEdit(QWidget *parent) : QAbstractScrollArea(parent)
|
||||
{
|
||||
mModified = false;
|
||||
mPaintLock = 0;
|
||||
mPainterLock = 0;
|
||||
mPainting = false;
|
||||
|
|
Loading…
Reference in New Issue