diff options
author | Laszlo Papp <lpapp@kde.org> | 2013-03-23 16:18:01 +0000 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-03-24 09:36:33 +0100 |
commit | 726571882cd9848c081c6c83c36f2b296d359b1b (patch) | |
tree | f93c4e37d60bf0999c300bb97492323f52dd6c8d /src/serialport/qserialportglobal.h | |
parent | 89acd52d6daea28415dfc313c0c25706ae356f29 (diff) | |
download | qtserialport-726571882cd9848c081c6c83c36f2b296d359b1b.tar.gz |
Make a good use of the new "override" C++11 specifier when available
The usage of the specifier helps to catch mistakes in general and also
explicitly shows the intention.
Furthermore, leave the "virtual" specifier out as per Qt Coding Style:
http://qt-project.org/wiki/Qt_Coding_Style#fe675674b70cdaca505f3cff0244fbae
It does not make much sense in general with the override specifier either
anyhow.
Note: an empty define is still necessary as long as QtSerialPort supports Qt4
which is the current situation.
Change-Id: Iedf01071e6303d88305c140f4a767bb43059f593
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Diffstat (limited to 'src/serialport/qserialportglobal.h')
-rw-r--r-- | src/serialport/qserialportglobal.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/serialport/qserialportglobal.h b/src/serialport/qserialportglobal.h index 6207f46..03cd6a6 100644 --- a/src/serialport/qserialportglobal.h +++ b/src/serialport/qserialportglobal.h @@ -57,6 +57,11 @@ QT_BEGIN_NAMESPACE # define Q_SERIALPORT_EXPORT #endif +// The macro has been available only since Qt 5.0 +#ifndef Q_DECL_OVERRIDE +#define Q_DECL_OVERRIDE +#endif + QT_END_NAMESPACE #endif // QSERIALPORTGLOBAL_H |