diff options
author | Anne Jan Brouwer <brouwer@annejan.com> | 2016-06-10 18:46:43 +0200 |
---|---|---|
committer | Anne Jan Brouwer <brouwer@annejan.com> | 2016-06-10 18:46:43 +0200 |
commit | 80525bc18c4ceaf5a77ae747824ecb54947e90de (patch) | |
tree | d1d2c3e1aec3f1c65596c926ecd6ffc572203948 | |
parent | 0e7f045ef3cc07f5be45138e2f95244acc518e84 (diff) |
Clear clipboard when exiting on signal whenever possible fixes #171
-rw-r--r-- | main.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -69,13 +69,15 @@ int main(int argc, char *argv[]) { app.installTranslator(&translator); app.setLayoutDirection(QObject::tr("LTR") == "RTL" ? Qt::RightToLeft : Qt::LeftToRight); - MainWindow w; + QObject::connect(&app, SIGNAL(aboutToQuit()), &w, SLOT(clearClipboard())); + app.setActiveWindow(&w); app.setWindowIcon(QIcon(":artwork/icon.png")); w.setApp(&app); w.setText(text); w.show(); + return app.exec(); } |