Use modeltest only for debug and if Qt >= 5.7

The modeltest code is not compatible with Qt 5.6 LTS
This commit is contained in:
Srivats P 2018-04-02 20:39:44 +05:30
parent db231054da
commit 227b8bdae4
3 changed files with 4 additions and 3 deletions

View File

@ -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
}

View File

@ -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;

View File

@ -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);