From d61a13e675917349677115c920709686c62c7657 Mon Sep 17 00:00:00 2001 From: Andy Shaw Date: Mon, 21 Oct 2019 13:30:47 +0200 Subject: Avoid conflicting class names if the plugins are linked statically MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit QtSerialBus is already using QtSerialPort which has a WriteNotifier and ReadNotifier class in place. Therefore it is possible that if these were linked in together into one application that there would be multiple instances of the same class name which caused problems as it would think that the WriteNotifier in QtSerialPort was a QTimer and not a QSocketNotifier. So keep the names unique to be on the safe side. Change-Id: I8667e3d4230b316d47e266ad1b4319cf5e74444b Reviewed-by: Alex Blasche (cherry picked from commit f129107e472c179e47b37d8fdaff120d1eccc7f8) Reviewed-by: André Hartmann --- src/plugins/canbus/peakcan/peakcanbackend.cpp | 18 +++++++++--------- src/plugins/canbus/tinycan/tinycanbackend.cpp | 8 ++++---- src/plugins/canbus/vectorcan/vectorcanbackend.cpp | 14 +++++++------- 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/plugins/canbus/peakcan/peakcanbackend.cpp b/src/plugins/canbus/peakcan/peakcanbackend.cpp index 411223a..172de14 100644 --- a/src/plugins/canbus/peakcan/peakcanbackend.cpp +++ b/src/plugins/canbus/peakcan/peakcanbackend.cpp @@ -1,4 +1,4 @@ -/**************************************************************************** +/**************************************************************************** ** ** Copyright (C) 2017 Denis Shienkov ** Copyright (C) 2017 The Qt Company Ltd. @@ -151,11 +151,11 @@ QList PeakCanBackend::interfaces() } #if defined(Q_OS_WIN32) -class ReadNotifier : public QWinEventNotifier +class PeakCanReadNotifier : public QWinEventNotifier { // no Q_OBJECT macro! public: - explicit ReadNotifier(PeakCanBackendPrivate *d, QObject *parent) + explicit PeakCanReadNotifier(PeakCanBackendPrivate *d, QObject *parent) : QWinEventNotifier(parent) , dptr(d) { @@ -176,11 +176,11 @@ private: PeakCanBackendPrivate * const dptr; }; #else -class ReadNotifier : public QSocketNotifier +class PeakCanReadNotifier : public QSocketNotifier { // no Q_OBJECT macro! public: - explicit ReadNotifier(PeakCanBackendPrivate *d, QObject *parent) + explicit PeakCanReadNotifier(PeakCanBackendPrivate *d, QObject *parent) : QSocketNotifier(d->readHandle, QSocketNotifier::Read, parent) , dptr(d) { @@ -201,11 +201,11 @@ private: }; #endif -class WriteNotifier : public QTimer +class PeakCanWriteNotifier : public QTimer { // no Q_OBJECT macro! public: - WriteNotifier(PeakCanBackendPrivate *d, QObject *parent) + PeakCanWriteNotifier(PeakCanBackendPrivate *d, QObject *parent) : QTimer(parent) , dptr(d) { @@ -358,10 +358,10 @@ bool PeakCanBackendPrivate::open() } #endif - writeNotifier = new WriteNotifier(this, q); + writeNotifier = new PeakCanWriteNotifier(this, q); writeNotifier->setInterval(0); - readNotifier = new ReadNotifier(this, q); + readNotifier = new PeakCanReadNotifier(this, q); readNotifier->setEnabled(true); isOpen = true; diff --git a/src/plugins/canbus/tinycan/tinycanbackend.cpp b/src/plugins/canbus/tinycan/tinycanbackend.cpp index 496770a..6453826 100644 --- a/src/plugins/canbus/tinycan/tinycanbackend.cpp +++ b/src/plugins/canbus/tinycan/tinycanbackend.cpp @@ -1,4 +1,4 @@ -/**************************************************************************** +/**************************************************************************** ** ** Copyright (C) 2017 Denis Shienkov ** Copyright (C) 2017 The Qt Company Ltd. @@ -89,11 +89,11 @@ struct TinyCanGlobal { Q_GLOBAL_STATIC(TinyCanGlobal, gTinyCan) -class WriteNotifier : public QTimer +class TinyCanWriteNotifier : public QTimer { // no Q_OBJECT macro! public: - WriteNotifier(TinyCanBackendPrivate *d, QObject *parent) + TinyCanWriteNotifier(TinyCanBackendPrivate *d, QObject *parent) : QTimer(parent) , dptr(d) { @@ -211,7 +211,7 @@ bool TinyCanBackendPrivate::open() } } - writeNotifier = new WriteNotifier(this, q); + writeNotifier = new TinyCanWriteNotifier(this, q); writeNotifier->setInterval(0); isOpen = true; diff --git a/src/plugins/canbus/vectorcan/vectorcanbackend.cpp b/src/plugins/canbus/vectorcan/vectorcanbackend.cpp index 40ba0ac..0e6d3ae 100644 --- a/src/plugins/canbus/vectorcan/vectorcanbackend.cpp +++ b/src/plugins/canbus/vectorcan/vectorcanbackend.cpp @@ -1,4 +1,4 @@ -/**************************************************************************** +/**************************************************************************** ** ** Copyright (C) 2017 Denis Shienkov ** Contact: http://www.qt.io/licensing/ @@ -103,11 +103,11 @@ QList VectorCanBackend::interfaces() static int driverRefCount = 0; -class ReadNotifier : public QWinEventNotifier +class VectorCanReadNotifier : public QWinEventNotifier { // no Q_OBJECT macro! public: - explicit ReadNotifier(VectorCanBackendPrivate *d, QObject *parent) + explicit VectorCanReadNotifier(VectorCanBackendPrivate *d, QObject *parent) : QWinEventNotifier(parent) , dptr(d) { @@ -128,11 +128,11 @@ private: VectorCanBackendPrivate * const dptr; }; -class WriteNotifier : public QTimer +class VectorCanWriteNotifier : public QTimer { // no Q_OBJECT macro! public: - WriteNotifier(VectorCanBackendPrivate *d, QObject *parent) + VectorCanWriteNotifier(VectorCanBackendPrivate *d, QObject *parent) : QTimer(parent) , dptr(d) { @@ -202,10 +202,10 @@ bool VectorCanBackendPrivate::open() } } - readNotifier = new ReadNotifier(this, q); + readNotifier = new VectorCanReadNotifier(this, q); readNotifier->setEnabled(true); - writeNotifier = new WriteNotifier(this, q); + writeNotifier = new VectorCanWriteNotifier(this, q); return true; } -- cgit v1.2.3 From 4347caecbd0b2d02074a033eabf7d114ad7ca5f6 Mon Sep 17 00:00:00 2001 From: Antti Kokko Date: Thu, 31 Oct 2019 13:26:55 +0200 Subject: Add changes file for Qt 5.12.6 + e993a7f1f24303b4b1274b8b0d5e747bc00b9dce CAN: Avoid symbol clashes on static builds + b0970e495f77e43bda85dbe267cf5c7cb7bfdf75 Bump version Change-Id: Iae399fb2c1c1768652c4c1ddb14b74b7cd12cb5f Reviewed-by: Alex Blasche --- dist/changes-5.12.6 | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 dist/changes-5.12.6 diff --git a/dist/changes-5.12.6 b/dist/changes-5.12.6 new file mode 100644 index 0000000..f7c1bb1 --- /dev/null +++ b/dist/changes-5.12.6 @@ -0,0 +1,25 @@ +Qt 5.12.6 is a bug-fix release. It maintains both forward and backward +compatibility (source and binary) with Qt 5.12.0 through 5.12.5. + +For more details, refer to the online documentation included in this +distribution. The documentation is also available online: + +https://doc.qt.io/qt-5/index.html + +The Qt version 5.12 series is binary compatible with the 5.11.x series. +Applications compiled for 5.11 will continue to run with 5.12. + +Some of the changes listed in this file include issue tracking numbers +corresponding to tasks in the Qt Bug Tracker: + +https://bugreports.qt.io/ + +Each of these identifiers can be entered in the bug tracker to obtain more +information about a particular change. + +**************************************************************************** +* Qt 5.12.6 Changes * +**************************************************************************** + + - [QTBUG-78546] Fixed problems on static builds where an arbitrary version + of resolveSymbol() was used instead of the correct one. -- cgit v1.2.3