diff options
author | Amit Chaudhuri <amit.k.chaudhuri@gmail.com> | 2013-04-18 08:59:31 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-04-18 12:31:15 -0700 |
commit | 073be111f48507f027256c6ecd6f11b19a2a18fc (patch) | |
tree | 083a3851fc64eb7a0557ffe789ab8e6b19483f5e /qt-gui.cpp | |
parent | 115ee47bfc0aa8ca2b2bdaca047ccf595bbb7120 (diff) | |
download | subsurface-073be111f48507f027256c6ecd6f11b19a2a18fc.tar.gz |
Delay Qt ui construction
The Qt ui will need to read the dive_table to populate widgets with
dives. Gtk functionality in init_ui is required to parse the dives.
Split init_ui to allow parsing to proceed and complete before Qt ui
mainwindow constructor is called.
Play with qDebug()'s printf style (Thiago!)
Signed-off-by: Amit Chaudhuri <amit.k.chaudhuri@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-gui.cpp')
-rw-r--r-- | qt-gui.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/qt-gui.cpp b/qt-gui.cpp index 745457763..86731bb36 100644 --- a/qt-gui.cpp +++ b/qt-gui.cpp @@ -1864,6 +1864,14 @@ QStringList MainWindow::fileNameFilters() const } #endif /* NEEDS_TO_MOVE_TO_QT_UI */ +void init_qt_ui(int *argcp, char ***argvp) +{ + application = new QApplication(*argcp, *argvp); + application->installTranslator(new Translator(application)); + MainWindow *window = new MainWindow(); + window->show(); +} + void init_ui(int *argcp, char ***argvp) { GtkWidget *win; @@ -1877,11 +1885,6 @@ void init_ui(int *argcp, char ***argvp) GtkSettings *settings; GtkUIManager *ui_manager; - application = new QApplication(*argcp, *argvp); - application->installTranslator(new Translator(application)); - MainWindow *window = new MainWindow(); - window->show(); - gtk_init(argcp, argvp); settings = gtk_settings_get_default(); gtk_settings_set_long_property(settings, "gtk-tooltip-timeout", 10, "subsurface setting"); |