summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLaszlo Papp <lpapp@kde.org>2014-05-09 17:10:40 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-05-13 15:41:02 +0200
commit4b34f99e837b8fff9e690e63f80da76805a4686f (patch)
tree2625fb3c8f3c0e1f8e070aa5c27263749c890e2f /src
parentdef2f0f007b160c0ca135786bcf73f2e6dc45fd6 (diff)
downloadqtserialport-4b34f99e837b8fff9e690e63f80da76805a4686f.tar.gz
Use Q_NULLPTR for null pointer purposes with NULL fallback for Qt 4
Change-Id: I5422376a26111f7c8e084791a059215238a16868 Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com> Reviewed-by: Steven Ceuppens <steven.ceuppens@icloud.com> Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/serialport/qserialport.h6
-rw-r--r--src/serialport/qserialport_wince.cpp2
-rw-r--r--src/serialport/qserialportglobal.h4
3 files changed, 8 insertions, 4 deletions
diff --git a/src/serialport/qserialport.h b/src/serialport/qserialport.h
index ee88c25..ae5eaf3 100644
--- a/src/serialport/qserialport.h
+++ b/src/serialport/qserialport.h
@@ -187,9 +187,9 @@ public:
NotOpenError
};
- explicit QSerialPort(QObject *parent = 0);
- explicit QSerialPort(const QString &name, QObject *parent = 0);
- explicit QSerialPort(const QSerialPortInfo &info, QObject *parent = 0);
+ explicit QSerialPort(QObject *parent = Q_NULLPTR);
+ explicit QSerialPort(const QString &name, QObject *parent = Q_NULLPTR);
+ explicit QSerialPort(const QSerialPortInfo &info, QObject *parent = Q_NULLPTR);
virtual ~QSerialPort();
void setPortName(const QString &name);
diff --git a/src/serialport/qserialport_wince.cpp b/src/serialport/qserialport_wince.cpp
index f5b17a2..9ccc361 100644
--- a/src/serialport/qserialport_wince.cpp
+++ b/src/serialport/qserialport_wince.cpp
@@ -115,7 +115,7 @@ class WaitCommEventBreaker : public QThread
{
Q_OBJECT
public:
- WaitCommEventBreaker(HANDLE handle, int timeout, QObject *parent = 0)
+ WaitCommEventBreaker(HANDLE handle, int timeout, QObject *parent = Q_NULLPTR)
: QThread(parent), handle(handle), timeout(timeout), worked(false) {
start();
}
diff --git a/src/serialport/qserialportglobal.h b/src/serialport/qserialportglobal.h
index d17ce6b..50f53e9 100644
--- a/src/serialport/qserialportglobal.h
+++ b/src/serialport/qserialportglobal.h
@@ -71,6 +71,10 @@ QT_BEGIN_NAMESPACE
#define QStringLiteral(str) QString::fromUtf8(str)
#endif
+#ifndef Q_NULLPTR
+#define Q_NULLPTR NULL
+#endif
+
QT_END_NAMESPACE
#endif // QSERIALPORTGLOBAL_H