GUI: use early return
This commit is contained in:
parent
cf9ece4187
commit
d4d1d32937
|
@ -65,7 +65,9 @@ bool Project::IsOpen() const
|
||||||
bool Project::Open()
|
bool Project::Open()
|
||||||
{
|
{
|
||||||
mPFile = new ProjectFile(mFilename, this);
|
mPFile = new ProjectFile(mFilename, this);
|
||||||
if (QFile::exists(mFilename)) {
|
if (!QFile::exists(mFilename))
|
||||||
|
return false;
|
||||||
|
|
||||||
if (!mPFile->Read()) {
|
if (!mPFile->Read()) {
|
||||||
QMessageBox msg(QMessageBox::Critical,
|
QMessageBox msg(QMessageBox::Critical,
|
||||||
tr("Cppcheck"),
|
tr("Cppcheck"),
|
||||||
|
@ -77,9 +79,8 @@ bool Project::Open()
|
||||||
mPFile->SetFilename(mFilename);
|
mPFile->SetFilename(mFilename);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Project::Edit()
|
bool Project::Edit()
|
||||||
|
|
Loading…
Reference in New Issue