diff --git a/libs/serialport/qserialportglobal.h b/libs/serialport/qserialportglobal.h index 03cd6a62b78b8287a365b54a1e436071be3dd83c..34c5ba4ffecda47477ac38f1595cbd2958088ad1 100644 --- a/libs/serialport/qserialportglobal.h +++ b/libs/serialport/qserialportglobal.h @@ -51,12 +51,12 @@ QT_BEGIN_NAMESPACE # if defined(QT_BUILD_SERIALPORT_LIB) # define Q_SERIALPORT_EXPORT Q_DECL_EXPORT # else -# define Q_SERIALPORT_EXPORT Q_DECL_IMPORT +//# define Q_SERIALPORT_EXPORT Q_DECL_IMPORT # endif #else # define Q_SERIALPORT_EXPORT #endif - +# define Q_SERIALPORT_EXPORT // The macro has been available only since Qt 5.0 #ifndef Q_DECL_OVERRIDE #define Q_DECL_OVERRIDE diff --git a/src/ui/XbeeConfigurationWindow.cpp b/src/ui/XbeeConfigurationWindow.cpp index 7be847ac651f6300758dc7ee8355238d5803045c..6910261889697aae34cdbe57da32c851688f386b 100644 --- a/src/ui/XbeeConfigurationWindow.cpp +++ b/src/ui/XbeeConfigurationWindow.cpp @@ -8,7 +8,8 @@ #include #ifdef _WIN32 -#include +//#include +#include #endif #if defined (__APPLE__) && defined (__MACH__) @@ -368,11 +369,12 @@ void XbeeConfigurationWindow::setupPortList() #ifdef _WIN32 // Get the ports available on this system - QList ports = QextSerialEnumerator::getPorts(); + QList ports = QSerialPortInfo::availablePorts(); + //QList ports = QextSerialEnumerator::getPorts(); // Add the ports in reverse order, because we prepend them to the list for (int i = ports.size() - 1; i >= 0; i--) { - QString portString = QString(ports.at(i).portName.toLocal8Bit().constData()) + " - " + QString(ports.at(i).friendName.toLocal8Bit().constData()).split("(").first(); + QString portString = QString(ports.at(i).portName.toLocal8Bit().constData()); // Prepend newly found port to the list if (portBox->findText(portString) == -1) { portBox->insertItem(0, portString);