diff options
author | Karsten Heimrich <karsten.heimrich@theqtcompany.com> | 2016-03-11 13:15:14 +0100 |
---|---|---|
committer | Alex Blasche <alexander.blasche@theqtcompany.com> | 2016-03-14 06:53:39 +0000 |
commit | 4a5ce24c6452ce2d141cd7bf9a2f46efe45ddb0b (patch) | |
tree | ed82cb45605471cb9dfd68dda16c4461ca06e7d6 /examples | |
parent | 985f5dcd1e2373eb85feacf3c6025058f73516b5 (diff) |
Fix: 'multiple definition' with static build (Windows).
Task-number: QTBUG-51745
Change-Id: Ied4145969f6c00b42b39830e5165970d3e26047b
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Diffstat (limited to 'examples')
-rw-r--r-- | examples/serialbus/modbus/adueditor/mainwindow.cpp | 10 | ||||
-rw-r--r-- | examples/serialbus/modbus/adueditor/modbustcpclient_p.h | 2 |
2 files changed, 7 insertions, 5 deletions
diff --git a/examples/serialbus/modbus/adueditor/mainwindow.cpp b/examples/serialbus/modbus/adueditor/mainwindow.cpp index 0ed2bda..171d79c 100644 --- a/examples/serialbus/modbus/adueditor/mainwindow.cpp +++ b/examples/serialbus/modbus/adueditor/mainwindow.cpp @@ -46,10 +46,12 @@ #include <QModbusPdu> #include <QSerialPortInfo> -QT_BEGIN_NAMESPACE -Q_LOGGING_CATEGORY(QT_MODBUS, "qt.modbus") -Q_LOGGING_CATEGORY(QT_MODBUS_LOW, "qt.modbus.lowlevel") -QT_END_NAMESPACE +#ifndef QT_STATIC + QT_BEGIN_NAMESPACE + Q_LOGGING_CATEGORY(QT_MODBUS, "qt.modbus") + Q_LOGGING_CATEGORY(QT_MODBUS_LOW, "qt.modbus.lowlevel") + QT_END_NAMESPACE +#endif QT_USE_NAMESPACE diff --git a/examples/serialbus/modbus/adueditor/modbustcpclient_p.h b/examples/serialbus/modbus/adueditor/modbustcpclient_p.h index 050985f..891a740 100644 --- a/examples/serialbus/modbus/adueditor/modbustcpclient_p.h +++ b/examples/serialbus/modbus/adueditor/modbustcpclient_p.h @@ -71,7 +71,7 @@ public: QModbusDevice::WriteError); return false; } - qCDebug(QT_MODBUS_LOW) << "Sent TCP ADU:" << buffer.toHex(); + qDebug() << "Sent TCP ADU:" << buffer.toHex(); qDebug() << "Sent TCP PDU:" << request << "with tId:" << hex << m_tId; return true; }; |