From 227b8bdae4a0703e313d9dbbfd43461f2872b2ce Mon Sep 17 00:00:00 2001 From: Srivats P Date: Mon, 2 Apr 2018 20:39:44 +0530 Subject: [PATCH] Use modeltest only for debug and if Qt >= 5.7 The modeltest code is not compatible with Qt 5.6 LTS --- client/ostinato.pro | 3 ++- client/portgrouplist.cpp | 2 +- client/streamconfigdialog.cpp | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/client/ostinato.pro b/client/ostinato.pro index 4554f96..a5fe7b0 100644 --- a/client/ostinato.pro +++ b/client/ostinato.pro @@ -115,7 +115,8 @@ QMAKE_DISTCLEAN += object_script.* include(../install.pri) include(../version.pri) -# TODO(LOW): Test only INCLUDEPATH += "../extra/modeltest" +greaterThan(QT_MINOR_VERSION, 6) { CONFIG(debug, debug|release): LIBS += -L"../extra/modeltest/$(OBJECTS_DIR)/" -lmodeltest CONFIG(debug, debug|release): QT += testlib +} diff --git a/client/portgrouplist.cpp b/client/portgrouplist.cpp index 9c16121..4b388e2 100644 --- a/client/portgrouplist.cpp +++ b/client/portgrouplist.cpp @@ -30,7 +30,7 @@ PortGroupList::PortGroupList() mDeviceGroupModel(this), mDeviceModel(this) { -#ifdef QT_NO_DEBUG +#if defined(QT_NO_DEBUG) || QT_VERSION < 0x050700 streamModelTester_ = NULL; portModelTester_ = NULL; portStatsModelTester_ = NULL; diff --git a/client/streamconfigdialog.cpp b/client/streamconfigdialog.cpp index cb05216..9be421d 100644 --- a/client/streamconfigdialog.cpp +++ b/client/streamconfigdialog.cpp @@ -175,7 +175,7 @@ StreamConfigDialog::StreamConfigDialog( LoadCurrentStream(); mpPacketModel = new PacketModel(this); tvPacketTree->setModel(mpPacketModel); -#ifdef QT_NO_DEBUG +#if defined(QT_NO_DEBUG) || QT_VERSION < 0x050700 mpPacketModelTester = NULL; #else mpPacketModelTester = new ModelTest(mpPacketModel);