diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2018-06-26 22:25:22 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2018-06-26 23:05:21 +0200 |
commit | d65936200a2756e6619a109fa6fa673b91df802e (patch) | |
tree | 80b6b6fc7ba9023cbe47290b8ae1bc5468a19bb1 /gui/init.cpp | |
parent | 4046773c41ee3c0f65840828ab983cfd13451c85 (diff) |
modernize C++ syntax
No visible changes (hopefully).
Diffstat (limited to 'gui/init.cpp')
-rw-r--r-- | gui/init.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gui/init.cpp b/gui/init.cpp index cddea9ae..75f6b1eb 100644 --- a/gui/init.cpp +++ b/gui/init.cpp @@ -169,7 +169,7 @@ void attach_parent_console() #endif -int run_window(QApplication& app, std::unique_ptr<QWidget> main_window) +static int run_window(std::unique_ptr<QWidget> main_window) { if (!main_window->isEnabled()) { @@ -177,8 +177,8 @@ int run_window(QApplication& app, std::unique_ptr<QWidget> main_window) return 2; } - app.setQuitOnLastWindowClosed(true); - int status = app.exec(); + QApplication::setQuitOnLastWindowClosed(true); + int status = QApplication::exec(); return status; } @@ -224,7 +224,7 @@ OTR_GUI_EXPORT int otr_main(int argc, char** argv, std::function<QWidget*()> con } } - int ret = run_window(app, std::unique_ptr<QWidget>(make_main_window())); + int ret = run_window(std::unique_ptr<QWidget>(make_main_window())); #if 0 // msvc crashes in Qt plugin system's dtor |