aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Kampas <martin.kampas@jolla.com>2016-11-22 15:27:28 +0100
committerJuergen Bocklage-Ryannel <juergen.bocklage-ryannel@pelagicore.com>2016-11-24 09:36:48 +0000
commite5120556768c94bbdbbc5bb6d6a6dcdd08a5f388 (patch)
tree905fd4f48f933bf2a9df1cc11bf1e829ef953299
parentbce1e2beabe6fa15b79c0d3d2641c99a2cb6581f (diff)
Add global compat. #defines for qInfo and related
Change-Id: I52b26e341824515e1cd37a0e630b3d7404fa453e Reviewed-by: Juergen Bocklage-Ryannel <juergen.bocklage-ryannel@pelagicore.com>
-rw-r--r--src/bench/hostwidget.cpp2
-rw-r--r--src/previewGenerator/main.cpp2
-rw-r--r--src/qmlhelper.cpp4
-rw-r--r--src/qmllive_global.h8
-rw-r--r--src/remotereceiver.cpp4
5 files changed, 10 insertions, 10 deletions
diff --git a/src/bench/hostwidget.cpp b/src/bench/hostwidget.cpp
index ef56eb7..804de9b 100644
--- a/src/bench/hostwidget.cpp
+++ b/src/bench/hostwidget.cpp
@@ -37,7 +37,7 @@
#include <QMessageBox>
Q_DECLARE_LOGGING_CATEGORY(csLog)
-Q_LOGGING_CATEGORY(csLog, "QmlLive.Bench.ConnectionState", QtWarningMsg)
+Q_LOGGING_CATEGORY(csLog, "QmlLive.Bench.ConnectionState", QtInfoMsg)
const int LABEL_STACK_INDEX=0;
const int PROGRESS_STACK_INDEX=1;
diff --git a/src/previewGenerator/main.cpp b/src/previewGenerator/main.cpp
index 8e8db68..a17e66d 100644
--- a/src/previewGenerator/main.cpp
+++ b/src/previewGenerator/main.cpp
@@ -89,7 +89,7 @@ private:
};
Q_DECLARE_LOGGING_CATEGORY(pg)
-Q_LOGGING_CATEGORY(pg, "PreviewGenerator", QtWarningMsg)
+Q_LOGGING_CATEGORY(pg, "PreviewGenerator", QtInfoMsg)
int main (int argc, char** argv)
{
diff --git a/src/qmlhelper.cpp b/src/qmlhelper.cpp
index b1ce54b..72dc1af 100644
--- a/src/qmlhelper.cpp
+++ b/src/qmlhelper.cpp
@@ -66,11 +66,7 @@ void QmlHelper::loadDummyData(QQmlEngine *engine, const QString &workspace)
}
}
if (obj) {
-#if QT_VERSION >= QT_VERSION_CHECK(5, 5, 0)
qInfo() << "loaded dummy data: " << dir.filePath(entry);
-#else
- qWarning() << "loaded dummy data: " << dir.filePath(entry);
-#endif
entry.chop(4);
engine->rootContext()->setContextProperty(entry, obj);
obj->setParent(engine);
diff --git a/src/qmllive_global.h b/src/qmllive_global.h
index f78924a..5ac7a36 100644
--- a/src/qmllive_global.h
+++ b/src/qmllive_global.h
@@ -45,6 +45,7 @@
#endif
#if defined(QMLLIVE_SOURCE)
+
# if !defined(QT_NO_DEBUG) || defined(QT_FORCE_ASSERTS)
# define LIVE_ASSERT(cond, action) Q_ASSERT(cond)
# else
@@ -54,6 +55,13 @@
action; \
} do {} while (0)
# endif
+
+#if QT_VERSION < QT_VERSION_CHECK(5, 5, 0)
+# define QtInfoMsg QtWarningMsg
+# define qInfo qWarning
+# define qCInfo qCWarning
#endif
+#endif // defined(QMLLIVE_SOURCE)
+
#endif // QMLLIVELIB_GLOBAL_H
diff --git a/src/remotereceiver.cpp b/src/remotereceiver.cpp
index 98cdaab..0175d44 100644
--- a/src/remotereceiver.cpp
+++ b/src/remotereceiver.cpp
@@ -106,11 +106,7 @@ bool RemoteReceiver::listen(int port, ConnectionOptions options)
m_server->listen(port);
if (m_connectionOptions & BlockingConnect) {
-#if QT_VERSION < QT_VERSION_CHECK(5, 5, 0)
- qWarning() << "Waiting for connection from QmlLive Bench…";
-#else
qInfo() << "Waiting for connection from QmlLive Bench…";
-#endif
QEventLoop loop;