Show error msg after an unsuccessful config export

This commit is contained in:
lupoDharkael
2018-01-20 17:58:44 +01:00
parent c1377d9610
commit 69625f427b

View File

@@ -100,7 +100,10 @@ void GeneneralConf::importConfiguration() {
void GeneneralConf::exportFileConfiguration() {
QString fileName = QFileDialog::getSaveFileName(this, tr("Save File"),
"flameshot.conf");
QFile::copy(ConfigHandler().configFilePath(), fileName);
bool ok = QFile::copy(ConfigHandler().configFilePath(), fileName);
if (!ok) {
QMessageBox::about(this, tr("Error"), tr("Unable to write file."));
}
}
void GeneneralConf::resetConfiguration() {