summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRolf Eike Beer <kde@opensource.sf-tec.de>2016-10-09 12:06:51 (GMT)
committerRolf Eike Beer <kde@opensource.sf-tec.de>2016-10-09 12:06:51 (GMT)
commit56b72f620c07d53be39fd1066a456e6be0677d2e (patch)
tree921f0c21c4eb6dc71330b37cd83ba38651bf6edf
parent01fe91f537380c7eed85a874dfa7ee52ef48c3bb (diff)
put the KGpgApp object on the stackrefs/backups/branch-frameworks-1478027647
This not only fixes a leak, it also avoids a crash on exit caused by QTBUG-52988.
-rw-r--r--main.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/main.cpp b/main.cpp
index d9caaaf..510fe21 100644
--- a/main.cpp
+++ b/main.cpp
@@ -27,9 +27,9 @@
int main(int argc, char *argv[])
{
- KGpgApp *app = new KGpgApp(argc, argv);
+ KGpgApp app(argc, argv);
- app->setAttribute(Qt::AA_UseHighDpiPixmaps, true);
+ app.setAttribute(Qt::AA_UseHighDpiPixmaps, true);
KCrash::initialize();
@@ -73,13 +73,13 @@ int main(int argc, char *argv[])
parser.addOption(QCommandLineOption(QStringList() << QLatin1String("V"), i18n("Verify signature")));
parser.addPositionalArgument(QLatin1String("[File]"), i18n("File to open"));
- parser.process(*app);
+ parser.process(app);
about.processCommandLine(&parser);
- app->setQuitOnLastWindowClosed(false);
+ app.setQuitOnLastWindowClosed(false);
KDBusService service(KDBusService::Unique);
- app->newInstance(parser);
+ app.newInstance(parser);
- return app->exec();
+ return app.exec();
}