From f129107e472c179e47b37d8fdaff120d1eccc7f8 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 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 --- src/plugins/canbus/tinycan/tinycanbackend.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/plugins/canbus/tinycan') 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; -- cgit v1.2.3