Fixed freeze when canceling projectfile dialog when creating a new Project.
Updated gui.pro (forgot it in last commit)
This commit is contained in:
parent
67fb2dc2c9
commit
b0f5b7dce0
|
@ -134,6 +134,6 @@ SOURCES += aboutdialog.cpp \
|
|||
win32 {
|
||||
DEFINES += _CRT_SECURE_NO_WARNINGS
|
||||
RC_FILE = cppcheck-gui.rc
|
||||
HEADERS += ../cli/resource.h
|
||||
HEADERS += ../lib/version.h
|
||||
LIBS += -lshlwapi
|
||||
}
|
||||
|
|
|
@ -965,10 +965,10 @@ void MainWindow::NewProjectFile()
|
|||
delete mProject;
|
||||
mProject = new Project(filepath, this);
|
||||
mProject->Create();
|
||||
mProject->Edit();
|
||||
|
||||
if (mProject->Edit()) {
|
||||
AddProjectMRU(filepath);
|
||||
CheckProject(mProject);
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::CloseProjectFile()
|
||||
|
|
|
@ -82,7 +82,7 @@ bool Project::Open()
|
|||
return false;
|
||||
}
|
||||
|
||||
void Project::Edit()
|
||||
bool Project::Edit()
|
||||
{
|
||||
ProjectFileDialog dlg(mFilename, mParentWidget);
|
||||
QString root = mPFile->GetRootPath();
|
||||
|
@ -118,7 +118,9 @@ void Project::Edit()
|
|||
mParentWidget);
|
||||
msg.exec();
|
||||
}
|
||||
return writeSuccess;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void Project::Create()
|
||||
|
|
|
@ -66,8 +66,9 @@ public:
|
|||
|
||||
/**
|
||||
* @brief Edit the project file.
|
||||
* @return true if editing was successful.
|
||||
*/
|
||||
void Edit();
|
||||
bool Edit();
|
||||
|
||||
/**
|
||||
* @brief Create new project file.
|
||||
|
|
Loading…
Reference in New Issue