From 69625f427b1988e7172ec70aab5f681446189dc3 Mon Sep 17 00:00:00 2001 From: lupoDharkael Date: Sat, 20 Jan 2018 17:58:44 +0100 Subject: [PATCH] Show error msg after an unsuccessful config export --- src/config/geneneralconf.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/config/geneneralconf.cpp b/src/config/geneneralconf.cpp index addd15b9..433ca4ea 100644 --- a/src/config/geneneralconf.cpp +++ b/src/config/geneneralconf.cpp @@ -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() {