aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGrigorii Zimin <gzimin@luxoft.com>2020-03-04 11:57:50 +0300
committerGrigorii Zimin <gzimin@luxoft.com>2020-03-04 10:57:45 +0000
commita107926dee46d1e944c3c28cb6071b24b3c4d600 (patch)
treec4a5b9f01fa6b9b12694005a3e225c535c470ff7
parentb73e2e1f13f752f50872220d21e09388e2e71458 (diff)
[cluster-app] fix macos start-up
and unify logging rules with compamion app Change-Id: I30b10d38f1c30dcfaa1e6eae1d23bc44bc595702 Reviewed-by: Egor Nemtsev <enemtsev@luxoft.com>
-rw-r--r--src/neptune-cluster-app/main.cpp16
-rw-r--r--src/neptune-cluster-app/neptune-cluster-app.pro10
2 files changed, 18 insertions, 8 deletions
diff --git a/src/neptune-cluster-app/main.cpp b/src/neptune-cluster-app/main.cpp
index b473713b..abc64db2 100644
--- a/src/neptune-cluster-app/main.cpp
+++ b/src/neptune-cluster-app/main.cpp
@@ -51,16 +51,24 @@ int main(int argc, char *argv[])
QCoreApplication::setOrganizationDomain(QStringLiteral("luxoft.com"));
QCoreApplication::setApplicationVersion("0.1");
QGuiApplication app(argc, argv);
+ // force application path, it'll update @load_path and others
+ QDir::setCurrent(qApp->applicationDirPath());
// @todo: add -c config file option and config file for it (json, xml, etc)
QCommandLineParser cmdParser;
cmdParser.setApplicationDescription(
- "Neptune Cluster\n\n"
- "Logging is turned off by default, use QT_LOGGING_RULES to change this\n");
+ "Neptune Cluster\n\n"
+ "Logging is turned off by default, to control log output please check command line "
+ "options or Qt Help for QT_LOGGING_RULES environment variable.\n");
cmdParser.addHelpOption();
+ cmdParser.addVersionOption();
+ const QCommandLineOption enableDefaultLoggingOption("verbose",
+ "Enables default Qt logging filter.");
+ cmdParser.addOption(enableDefaultLoggingOption);
cmdParser.process(app);
-
- QLoggingCategory::setFilterRules("*=false");
+ if (!cmdParser.isSet(enableDefaultLoggingOption)) {
+ QLoggingCategory::setFilterRules("*=false");
+ }
if (!qEnvironmentVariableIsSet("QT_QUICK_CONTROLS_STYLE_PATH")) {
qputenv("QT_QUICK_CONTROLS_STYLE_PATH"
diff --git a/src/neptune-cluster-app/neptune-cluster-app.pro b/src/neptune-cluster-app/neptune-cluster-app.pro
index 964fbf0d..154c5fe4 100644
--- a/src/neptune-cluster-app/neptune-cluster-app.pro
+++ b/src/neptune-cluster-app/neptune-cluster-app.pro
@@ -4,6 +4,10 @@ TEMPLATE = app
TARGET = neptune-cluster-app
QT *= quick gui core ivicore
+isEmpty(INSTALL_PREFIX) {
+ INSTALL_PREFIX=/opt
+}
+
# check ogl-runtime
qtHaveModule(studio3d) {
QT *= studio3d
@@ -14,11 +18,9 @@ CONFIG += c++11
macos: CONFIG -= app_bundle
DESTDIR = $$OUT_PWD/../../
-LIBS += -L$$LIB_DESTDIR -l$$qtLibraryTarget(remotesettings) -l$$qtLibraryTarget(drivedata)
-isEmpty(INSTALL_PREFIX) {
- INSTALL_PREFIX=/opt
-}
+QMAKE_RPATHDIR += $$QMAKE_REL_RPATH_BASE/$$relative_path($$INSTALL_PREFIX/neptune3/lib, $$INSTALL_PREFIX/neptune3/)
+LIBS += -L$$LIB_DESTDIR -l$$qtLibraryTarget(remotesettings) -l$$qtLibraryTarget(drivedata)
SOURCES += \
main.cpp