aboutsummaryrefslogtreecommitdiffstats
path: root/qt-gui.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qt-gui.cpp')
-rw-r--r--qt-gui.cpp21
1 files changed, 9 insertions, 12 deletions
diff --git a/qt-gui.cpp b/qt-gui.cpp
index eb199f0ab..7414ad426 100644
--- a/qt-gui.cpp
+++ b/qt-gui.cpp
@@ -70,18 +70,6 @@ static QApplication *application = NULL;
int error_count;
const char *existing_filename;
-void init_qt_ui(int *argcp, char ***argvp, char *errormessage)
-{
- application->installTranslator(new Translator(application));
- MainWindow *window = new MainWindow();
- window->showError(errormessage);
- window->show();
- if (existing_filename && existing_filename[0] != '\0')
- window->setTitle(MWTF_FILENAME);
- else
- window->setTitle(MWTF_DEFAULT);
-}
-
const char *getSetting(QSettings &s, QString name)
{
QVariant v;
@@ -127,6 +115,15 @@ void init_ui(int *argcp, char ***argvp)
default_dive_computer_product = getSetting(s,"dive_computer_product");
default_dive_computer_device = getSetting(s, "dive_computer_device");
s.endGroup();
+
+ application->installTranslator(new Translator(application));
+ MainWindow *window = new MainWindow();
+ window->show();
+ if (existing_filename && existing_filename[0] != '\0')
+ window->setTitle(MWTF_FILENAME);
+ else
+ window->setTitle(MWTF_DEFAULT);
+
return;
}