aboutsummaryrefslogtreecommitdiffstats
path: root/subsurface-desktop-main.cpp
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2015-11-05 10:05:22 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-11-05 13:45:50 -0800
commit081295cb406f5284b8aae3ef0dcbcdad01241179 (patch)
treeb19a0fae132c52ea8e8c9d95c98287c638e73476 /subsurface-desktop-main.cpp
parent533d724d1b4380741ce7db91c39262df6c0df062 (diff)
downloadsubsurface-081295cb406f5284b8aae3ef0dcbcdad01241179.tar.gz
Untangle Profile from MainWindow: files on command line
There's no reason why this should be on the MainWindow widget. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'subsurface-desktop-main.cpp')
-rw-r--r--subsurface-desktop-main.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/subsurface-desktop-main.cpp b/subsurface-desktop-main.cpp
index a40edda1b..725011fc2 100644
--- a/subsurface-desktop-main.cpp
+++ b/subsurface-desktop-main.cpp
@@ -21,6 +21,8 @@
QTranslator *qtTranslator, *ssrfTranslator;
+static bool filesOnCommandLine = false;
+
int main(int argc, char **argv)
{
int i;
@@ -77,7 +79,7 @@ int main(int argc, char **argv)
}
}
MainWindow *m = MainWindow::instance();
- m->setLoadedWithFiles(!files.isEmpty() || !importedFiles.isEmpty());
+ filesOnCommandLine = !files.isEmpty() || !importedFiles.isEmpty();
m->loadFiles(files);
m->importFiles(importedFiles);
// in case something has gone wrong make sure we show the error message
@@ -98,3 +100,8 @@ int main(int argc, char **argv)
free_prefs();
return 0;
}
+
+bool haveFilesOnCommandLine()
+{
+ return filesOnCommandLine;
+}