diff options
author | Robert C. Helling <robert@thetheoreticaldiver.org> | 2017-06-07 11:00:38 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2017-06-11 13:50:30 -0700 |
commit | 6963b52d9682c09d311ecc2d5a7380b7f1bc77e0 (patch) | |
tree | 381e1f498f3d8cdb3969d1af393254185c91c4a4 /smtk-import/smtk_standalone.cpp | |
parent | 22612831bbd302bbc3f68ff377ccb8d53580c812 (diff) | |
download | subsurface-6963b52d9682c09d311ecc2d5a7380b7f1bc77e0.tar.gz |
Let command line version not open an X window
So we can run it on a headless system
Signed-off-by: Robert C. Helling <helling@atdotde.de>
Diffstat (limited to 'smtk-import/smtk_standalone.cpp')
-rw-r--r-- | smtk-import/smtk_standalone.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/smtk-import/smtk_standalone.cpp b/smtk-import/smtk_standalone.cpp index 6385f87ea..2442d70d4 100644 --- a/smtk-import/smtk_standalone.cpp +++ b/smtk-import/smtk_standalone.cpp @@ -5,6 +5,7 @@ #include "smrtk2ssrfc_window.h" #include <QApplication> #include <QDebug> +#define COMMANDLINE 1 extern "C" void smartrak_import(const char *file, struct dive_table *table); @@ -17,13 +18,19 @@ int main(int argc, char *argv[]) { char *infile, *outfile; int i; +#ifndef COMMANDLINE QApplication a(argc, argv); Smrtk2ssrfcWindow w; +#else + QCoreApplication a(argc, argv); +#endif switch (argc) { case 1: +#ifndef COMMANDLINE w.show(); return a.exec(); +#endif break; case 2: qDebug() << "\nUsage:\n"; |