summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlbert Astals Cid <aacid@kde.org>2016-05-04 20:54:05 (GMT)
committerAlbert Astals Cid <aacid@kde.org>2016-05-04 20:54:23 (GMT)
commitf9917aa9fe4274d8bce3418437ae8db917e121ec (patch)
treed967476c61df09fe577726122724e63f5cab0aef
parentd01a5704bf14d0b1b9795512ce235a8abb680fc1 (diff)
Mark this as not official release
-rw-r--r--shell/main.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/shell/main.cpp b/shell/main.cpp
index f67eb8c..ce3e283 100644
--- a/shell/main.cpp
+++ b/shell/main.cpp
@@ -20,7 +20,7 @@
#include <kwindowsystem.h>
#include <QApplication>
#include <KAboutData>
-#include <KLocalizedString>
+#include <KMessageBox>
#include <QCommandLineParser>
#include <QCommandLineOption>
#include "aboutdata.h"
@@ -82,6 +82,19 @@ int main(int argc, char** argv)
}
}
+ // Make sure that if the user answered "No" and "Don't ask again"
+ // he actually still has an option of answering Yes
+ KMessageBox::ButtonCode result = KMessageBox::Yes;
+ KMessageBox::shouldBeShownYesNo(QStringLiteral("frameworks_not_official"), result);
+ if (result != KMessageBox::Yes) {
+ KMessageBox::enableMessage(QStringLiteral("frameworks_not_official"));
+ }
+
+ if (KMessageBox::warningYesNo( 0, i18n("This is not an official release of Okular.\nIf you need the best possible Okular experience you should use the kdelibs4-based version instead of the version based on KDE Frameworks 5.\nIf you report bugs make sure you mark them with [frameworks] in the Summary and understand not official release bugs have less priority.\nDo you understand?"), QString(), KStandardGuiItem::yes(), KStandardGuiItem::no(), QStringLiteral("frameworks_not_official") ) != KMessageBox::Yes)
+ {
+ return 1;
+ }
+
return app.exec();
}