summaryrefslogtreecommitdiff
path: root/src/serialport/qserialportglobal.h
diff options
context:
space:
mode:
authorLaszlo Papp <lpapp@kde.org>2013-11-06 08:37:47 +0000
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-11-06 09:55:30 +0100
commit8e0b66f1269c0516fd339a18b5644bf38a1e2412 (patch)
tree14bb8482e2ca6d7712657163f85a916b1f0671a4 /src/serialport/qserialportglobal.h
parent77f5e60cd23391f5103ac9c238066611b2fc4223 (diff)
downloadqtserialport-8e0b66f1269c0516fd339a18b5644bf38a1e2412.tar.gz
Define QStringLiteral when undefined (e.g. Qt 4)
This will allow us Qt 5 style coding. QLatin1String replaced everywhere where it works for Qt 4 and 5, namely: the direct literal passing. Note that the "standard" typo has also been fixed in this commit as the line had to change anyway, so it is not much of an additional noise. Change-Id: I8b7e4fe5f337441000bd3d8f58db528fdd0e175b Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com> Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Diffstat (limited to 'src/serialport/qserialportglobal.h')
-rw-r--r--src/serialport/qserialportglobal.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/serialport/qserialportglobal.h b/src/serialport/qserialportglobal.h
index 03cd6a6..09ba0df 100644
--- a/src/serialport/qserialportglobal.h
+++ b/src/serialport/qserialportglobal.h
@@ -43,6 +43,7 @@
#ifndef QSERIALPORTGLOBAL_H
#define QSERIALPORTGLOBAL_H
+#include <QtCore/qstring.h>
#include <QtCore/qglobal.h>
QT_BEGIN_NAMESPACE
@@ -57,11 +58,15 @@ QT_BEGIN_NAMESPACE
# define Q_SERIALPORT_EXPORT
#endif
-// The macro has been available only since Qt 5.0
+// These macros have been available only since Qt 5.0
#ifndef Q_DECL_OVERRIDE
#define Q_DECL_OVERRIDE
#endif
+#ifndef QStringLiteral
+#define QStringLiteral(str) QString::fromUtf8(str)
+#endif
+
QT_END_NAMESPACE
#endif // QSERIALPORTGLOBAL_H