summaryrefslogtreecommitdiffstats
path: root/dialog.cpp
diff options
context:
space:
mode:
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>2015-05-31 13:33:19 +0200
committerReimar Döffinger <Reimar.Doeffinger@gmx.de>2015-05-31 13:33:19 +0200
commit99c6c5ee35f715605d8f459a07cc884da426c281 (patch)
tree95afddd4159ec506c2a9846cd0496a8572a740ae /dialog.cpp
parent30b00d24220dd1e1b009ef6f3820a5c8154bd1fe (diff)
Fix crashes with Qt 5.4.1 (Debian unstable version).
Seems likely to be a Qt bug though. Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
Diffstat (limited to 'dialog.cpp')
-rw-r--r--dialog.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/dialog.cpp b/dialog.cpp
index 71032a68..598e28b4 100644
--- a/dialog.cpp
+++ b/dialog.cpp
@@ -358,6 +358,12 @@ void Dialog::addGPGId(bool addGPGId)
{
ui->checkBoxAddGPGId->setChecked(addGPGId);
}
+
+void Dialog::criticalMessage(const QString &title, const QString &text)
+{
+ QMessageBox::critical(this, title, text, QMessageBox::StandardButton::Ok, QMessageBox::StandardButton::Ok);
+}
+
/**
* @brief Dialog::wizard
*/
@@ -368,7 +374,7 @@ void Dialog::wizard()
QString gpg = ui->gpgPath->text();
//QString gpg = mainWindow->getGpgExecutable();
if(!QFile(gpg).exists()){
- QMessageBox::critical(this, tr("GnuPG not found"),
+ criticalMessage(tr("GnuPG not found"),
tr("Please install GnuPG on your system.<br>Install <strong>gpg</strong> using your favorite package manager<br>or <a href=\"https://www.gnupg.org/download/#sec-1-2\">download</a> it from GnuPG.org"));
// TODO REST ?
@@ -383,7 +389,7 @@ void Dialog::wizard()
QString passStore = ui->storePath->text();
if(!QFile(passStore + ".gpg-id").exists()){
- QMessageBox::critical(this, tr("Password store not initialised"),
+ criticalMessage(tr("Password store not initialised"),
tr("The folder %1 doesn't seem to be a password store or is not yet initialised.").arg(passStore));
while(!QFile(passStore).exists()) {
on_toolButtonStore_clicked();