diff options
author | Anne Jan Brouwer <brouwer@annejan.com> | 2018-05-03 23:24:38 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-03 23:24:38 +0200 |
commit | 3f93f6321a1f13d464164480086a2d0c8001662e (patch) | |
tree | b38d1284f1b49937f3e8039e3a10b900c6ea4625 /main | |
parent | 4a530820f9270dea749a467b3d78449b53a18ed3 (diff) | |
parent | 911b12de792995a8612a9ca2bd3ec9b5084f3954 (diff) |
Merge pull request #382 from UnitooTeam/master
Move connect action to main.cpp. Default search text as parameter of…
Diffstat (limited to 'main')
-rw-r--r-- | main/main.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/main/main.cpp b/main/main.cpp index cb1e2912..baec2707 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -81,14 +81,17 @@ 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())); + MainWindow w(text); app.setActiveWindow(&w); app.setWindowIcon(QIcon(":artwork/icon.png")); - w.setApp(&app); - w.setText(text); + + QObject::connect(&app, SIGNAL(aboutToQuit()), &w, SLOT(clearClipboard())); +#if SINGLE_APP + QObject::connect(&app, SIGNAL(messageAvailable(QString)), &w, + SLOT(messageAvailable(QString))); +#endif + w.show(); return app.exec(); |