diff --git a/src/AddDeviceWizard.cpp b/src/AddDeviceWizard.cpp index 911f17c79..2ddf598fb 100644 --- a/src/AddDeviceWizard.cpp +++ b/src/AddDeviceWizard.cpp @@ -202,7 +202,9 @@ DeviceScanner::quickScan(bool deep) // scan quickly or if true scan forever, as // we will need a factory for this soon.. case DEV_CT : wizard->controller = new ComputrainerController(NULL, NULL); break; +#if QT_VERSION >= 0x050000 case DEV_MONARK : wizard->controller = new MonarkController(NULL, NULL); break; +#endif #ifdef GC_HAVE_LIBUSB case DEV_FORTIUS : wizard->controller = new FortiusController(NULL, NULL); break; #endif diff --git a/src/AddDeviceWizard.h b/src/AddDeviceWizard.h index aa02e92e7..2da8f3e29 100644 --- a/src/AddDeviceWizard.h +++ b/src/AddDeviceWizard.h @@ -32,7 +32,9 @@ #include "FortiusController.h" #endif #include "ComputrainerController.h" +#if QT_VERSION >= 0x050000 #include "MonarkController.h" +#endif #include "ANTlocalController.h" #include "ANTChannel.h" #include "NullController.h" diff --git a/src/DeviceTypes.cpp b/src/DeviceTypes.cpp index d5efdeb9c..832d0d16d 100644 --- a/src/DeviceTypes.cpp +++ b/src/DeviceTypes.cpp @@ -56,9 +56,11 @@ DeviceTypes::DeviceTypes() tr("Racermate Computrainer Lab or Pro bike trainer with the handlebar controller " "connected via a USB adaptor or directly connected to a local serial port.") , ":images/devices/computrainer.png" }, +#if QT_VERSION >= 0x050000 { DEV_MONARK, DEV_SERIAL, (char *) "Monark LTx/LCx",true, false, tr("Monark USB device ") , ":images/devices/monark_lt2.png" }, +#endif #ifdef GC_HAVE_LIBUSB { DEV_FORTIUS, DEV_LIBUSB, (char *) "Tacx Fortius", true, false, tr("Tacx Fortius/iMagic bike trainer with the handlebar controller connected " diff --git a/src/src.pro b/src/src.pro index 356e2a39e..345569d68 100644 --- a/src/src.pro +++ b/src/src.pro @@ -21,7 +21,7 @@ LIBS += -lm $${LIBZ_LIBS} # 5.2.0 or higher # ## common modules -QT += xml sql network script svg concurrent serialport +QT += xml sql network script svg concurrent lessThan(QT_MAJOR_VERSION, 5) { @@ -31,7 +31,7 @@ lessThan(QT_MAJOR_VERSION, 5) { } else { ## QT5 specific modules - QT += webkitwidgets widgets concurrent + QT += webkitwidgets widgets concurrent serialport macx { QT += macextras webenginewidgets } else { @@ -41,6 +41,10 @@ lessThan(QT_MAJOR_VERSION, 5) { ## QT5 can support complex JSON documents SOURCES += Dropbox.cpp HEADERS += Dropbox.h + + ## Monark support needs QtSerialPort + SOURCES += Monark.cpp MonarkController.cpp MonarkConnection.cpp + HEADERS += Monark.h MonarkController.h MonarkConnection.h } # if we are building in debug mode @@ -455,9 +459,6 @@ HEADERS += \ RealtimeController.h \ ReferenceLineDialog.h \ ComputrainerController.h \ - MonarkConnection.h \ - MonarkController.h \ - Monark.h \ RealtimePlot.h \ RideAutoImportConfig.h \ RideCache.h \ @@ -705,9 +706,6 @@ SOURCES += \ RealtimeData.cpp \ RealtimeController.cpp \ ComputrainerController.cpp \ - MonarkConnection.cpp \ - MonarkController.cpp \ - Monark.cpp \ RealtimePlot.cpp \ RealtimePlotWindow.cpp \ ReferenceLineDialog.cpp \