Show a message when failing to load the key file
[quassel.git] / src / qtui / settingspages / identityeditwidget.cpp
index 27e0609..b5a3dfa 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
@@ -25,6 +25,7 @@
 #include <QDropEvent>
 #include <QFileDialog>
 #include <QUrl>
+#include <QMessageBox>
 
 #include "client.h"
 #include "iconloader.h"
@@ -340,6 +341,7 @@ QSslKey IdentityEditWidget::keyByFilename(const QString &filename)
                 goto returnKey;
         }
     }
+    QMessageBox::information(this, tr("Failed to read key"), tr("Failed to read the key file. It is either incompatible or invalid. Note that the key file must not have a passphrase."));
 returnKey:
     return key;
 }