GUI: Use early return

This commit is contained in:
Daniel Marjamäki 2017-11-11 21:52:36 +01:00
parent 526d8b76a6
commit 63feebc34f
1 changed files with 27 additions and 26 deletions

View File

@ -86,7 +86,9 @@ void LibraryDialog::openCfg()
filter,
&selectedFilter);
if (!selectedFile.isEmpty()) {
if (selectedFile.isEmpty())
return;
QFile file(selectedFile);
if (file.open(QIODevice::ReadOnly | QIODevice::Text)) {
ignoreChanges = true;
@ -113,7 +115,6 @@ void LibraryDialog::openCfg()
this);
msg.exec();
}
}
}
void LibraryDialog::saveCfg()