Qt: Prevent savestate load/save on empty filename
This commit is contained in:
parent
b514df1227
commit
9b1d657614
|
@ -1352,7 +1352,8 @@ void MainWindow::StateLoad()
|
||||||
QString path =
|
QString path =
|
||||||
DolphinFileDialog::getOpenFileName(this, tr("Select a File"), QDir::currentPath(),
|
DolphinFileDialog::getOpenFileName(this, tr("Select a File"), QDir::currentPath(),
|
||||||
tr("All Save States (*.sav *.s##);; All Files (*)"));
|
tr("All Save States (*.sav *.s##);; All Files (*)"));
|
||||||
State::LoadAs(path.toStdString());
|
if (!path.isEmpty())
|
||||||
|
State::LoadAs(path.toStdString());
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::StateSave()
|
void MainWindow::StateSave()
|
||||||
|
@ -1360,7 +1361,8 @@ void MainWindow::StateSave()
|
||||||
QString path =
|
QString path =
|
||||||
DolphinFileDialog::getSaveFileName(this, tr("Select a File"), QDir::currentPath(),
|
DolphinFileDialog::getSaveFileName(this, tr("Select a File"), QDir::currentPath(),
|
||||||
tr("All Save States (*.sav *.s##);; All Files (*)"));
|
tr("All Save States (*.sav *.s##);; All Files (*)"));
|
||||||
State::SaveAs(path.toStdString());
|
if (!path.isEmpty())
|
||||||
|
State::SaveAs(path.toStdString());
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::StateLoadSlot()
|
void MainWindow::StateLoadSlot()
|
||||||
|
|
Loading…
Reference in New Issue