diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-10-07 13:05:48 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-10-07 23:02:47 +0200 |
commit | 564b59d903683b14c75b72a3e93367717f201def (patch) | |
tree | 03ffe749d83dce84429a7db484bf92795047036f /src/plugins/platforms/qnx | |
parent | b5fc1e4e2643e73d3b44c483d159529f8deb8af1 (diff) |
Another round of replacing 0 with nullptr
This time based on grepping to also include documentation, tests and
examples previously missed by the automatic tool.
Change-Id: Ied1703f4bcc470fbc275f759ed5b7c588a5c4e9f
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'src/plugins/platforms/qnx')
-rw-r--r-- | src/plugins/platforms/qnx/qqnxabstractnavigator.h | 2 | ||||
-rw-r--r-- | src/plugins/platforms/qnx/qqnxabstractvirtualkeyboard.h | 2 | ||||
-rw-r--r-- | src/plugins/platforms/qnx/qqnxbuffer.cpp | 2 | ||||
-rw-r--r-- | src/plugins/platforms/qnx/qqnxbuffer.h | 4 | ||||
-rw-r--r-- | src/plugins/platforms/qnx/qqnxbuttoneventnotifier.h | 2 | ||||
-rw-r--r-- | src/plugins/platforms/qnx/qqnxinputcontext_imf.cpp | 22 | ||||
-rw-r--r-- | src/plugins/platforms/qnx/qqnxnavigatoreventhandler.h | 2 | ||||
-rw-r--r-- | src/plugins/platforms/qnx/qqnxnavigatoreventnotifier.h | 2 | ||||
-rw-r--r-- | src/plugins/platforms/qnx/qqnxnavigatorpps.h | 2 | ||||
-rw-r--r-- | src/plugins/platforms/qnx/qqnxrasterbackingstore.cpp | 2 | ||||
-rw-r--r-- | src/plugins/platforms/qnx/qqnxwindow.cpp | 6 |
11 files changed, 24 insertions, 24 deletions
diff --git a/src/plugins/platforms/qnx/qqnxabstractnavigator.h b/src/plugins/platforms/qnx/qqnxabstractnavigator.h index 24e28dae96..abacf80f54 100644 --- a/src/plugins/platforms/qnx/qqnxabstractnavigator.h +++ b/src/plugins/platforms/qnx/qqnxabstractnavigator.h @@ -50,7 +50,7 @@ class QQnxAbstractNavigator : public QObject { Q_OBJECT public: - explicit QQnxAbstractNavigator(QObject *parent = 0); + explicit QQnxAbstractNavigator(QObject *parent = nullptr); ~QQnxAbstractNavigator(); bool invokeUrl(const QUrl &url); diff --git a/src/plugins/platforms/qnx/qqnxabstractvirtualkeyboard.h b/src/plugins/platforms/qnx/qqnxabstractvirtualkeyboard.h index 24be03b46c..92f6308487 100644 --- a/src/plugins/platforms/qnx/qqnxabstractvirtualkeyboard.h +++ b/src/plugins/platforms/qnx/qqnxabstractvirtualkeyboard.h @@ -64,7 +64,7 @@ public: enum KeyboardMode { Default, Url, Email, Web, NumPunc, Number, Symbol, Phone, Pin, Password, Alphanumeric }; enum EnterKeyType { DefaultReturn, Connect, Done, Go, Join, Next, Search, Send, Submit }; - explicit QQnxAbstractVirtualKeyboard(QObject *parent = 0); + explicit QQnxAbstractVirtualKeyboard(QObject *parent = nullptr); virtual bool showKeyboard() = 0; virtual bool hideKeyboard() = 0; diff --git a/src/plugins/platforms/qnx/qqnxbuffer.cpp b/src/plugins/platforms/qnx/qqnxbuffer.cpp index cd05a679b1..b02a989ea8 100644 --- a/src/plugins/platforms/qnx/qqnxbuffer.cpp +++ b/src/plugins/platforms/qnx/qqnxbuffer.cpp @@ -77,7 +77,7 @@ QQnxBuffer::QQnxBuffer(screen_buffer_t buffer) // Get access to buffer's data errno = 0; - uchar *dataPtr = 0; + uchar *dataPtr = nullptr; Q_SCREEN_CRITICALERROR( screen_get_buffer_property_pv(buffer, SCREEN_PROPERTY_POINTER, (void **)&dataPtr), "Failed to query buffer pointer"); diff --git a/src/plugins/platforms/qnx/qqnxbuffer.h b/src/plugins/platforms/qnx/qqnxbuffer.h index 9ee0d5d60c..4b8adb20db 100644 --- a/src/plugins/platforms/qnx/qqnxbuffer.h +++ b/src/plugins/platforms/qnx/qqnxbuffer.h @@ -55,8 +55,8 @@ public: virtual ~QQnxBuffer(); screen_buffer_t nativeBuffer() const { return m_buffer; } - const QImage *image() const { return (m_buffer != 0) ? &m_image : 0; } - QImage *image() { return (m_buffer != 0) ? &m_image : 0; } + const QImage *image() const { return (m_buffer != nullptr) ? &m_image : nullptr; } + QImage *image() { return (m_buffer != nullptr) ? &m_image : nullptr; } QRect rect() const { return m_image.rect(); } diff --git a/src/plugins/platforms/qnx/qqnxbuttoneventnotifier.h b/src/plugins/platforms/qnx/qqnxbuttoneventnotifier.h index aa2c118b3a..7cc67f2459 100644 --- a/src/plugins/platforms/qnx/qqnxbuttoneventnotifier.h +++ b/src/plugins/platforms/qnx/qqnxbuttoneventnotifier.h @@ -64,7 +64,7 @@ public: ButtonDown }; - explicit QQnxButtonEventNotifier(QObject *parent = 0); + explicit QQnxButtonEventNotifier(QObject *parent = nullptr); ~QQnxButtonEventNotifier(); public Q_SLOTS: diff --git a/src/plugins/platforms/qnx/qqnxinputcontext_imf.cpp b/src/plugins/platforms/qnx/qqnxinputcontext_imf.cpp index ce3a445d7c..79f6273e9f 100644 --- a/src/plugins/platforms/qnx/qqnxinputcontext_imf.cpp +++ b/src/plugins/platforms/qnx/qqnxinputcontext_imf.cpp @@ -76,8 +76,8 @@ static QQnxInputContext *sInputContextInstance; static QColor sSelectedColor(0,0xb8,0,85); -static const input_session_t *sSpellCheckSession = 0; -static const input_session_t *sInputSession = 0; +static const input_session_t *sSpellCheckSession = nullptr; +static const input_session_t *sInputSession = nullptr; static bool isSessionOkay(input_session_t *ic) { return ic !=0 && sInputSession != 0 && ic->component_id == sInputSession->component_id; @@ -515,13 +515,13 @@ static spannable_string_t *toSpannableString(const QString &text) } -static const input_session_t *(*p_ictrl_open_session)(connection_interface_t *) = 0; -static void (*p_ictrl_close_session)(input_session_t *) = 0; -static int32_t (*p_ictrl_dispatch_event)(event_t*) = 0; -static int32_t (*p_imf_client_init)() = 0; -static void (*p_imf_client_disconnect)() = 0; -static int32_t (*p_vkb_init_selection_service)() = 0; -static int32_t (*p_ictrl_get_num_active_sessions)() = 0; +static const input_session_t *(*p_ictrl_open_session)(connection_interface_t *) = nullptr; +static void (*p_ictrl_close_session)(input_session_t *) = nullptr; +static int32_t (*p_ictrl_dispatch_event)(event_t*) = nullptr; +static int32_t (*p_imf_client_init)() = nullptr; +static void (*p_imf_client_disconnect)() = nullptr; +static int32_t (*p_vkb_init_selection_service)() = nullptr; +static int32_t (*p_ictrl_get_num_active_sessions)() = nullptr; static bool s_imfInitFailed = false; static bool imfAvailable() @@ -602,7 +602,7 @@ QQnxInputContext::~QQnxInputContext() qInputContextDebug(); Q_ASSERT(sInputContextInstance == this); - sInputContextInstance = 0; + sInputContextInstance = nullptr; if (!imfAvailable()) return; @@ -735,7 +735,7 @@ void QQnxInputContext::closeSession() if (sInputSession) { p_ictrl_close_session((input_session_t *)sInputSession); - sInputSession = 0; + sInputSession = nullptr; } // These are likely already in the right state but this depends on the text control // having called reset or commit. So, just in case, set them to proper values. diff --git a/src/plugins/platforms/qnx/qqnxnavigatoreventhandler.h b/src/plugins/platforms/qnx/qqnxnavigatoreventhandler.h index 3e10052459..6bedfaf963 100644 --- a/src/plugins/platforms/qnx/qqnxnavigatoreventhandler.h +++ b/src/plugins/platforms/qnx/qqnxnavigatoreventhandler.h @@ -48,7 +48,7 @@ class QQnxNavigatorEventHandler : public QObject { Q_OBJECT public: - explicit QQnxNavigatorEventHandler(QObject *parent = 0); + explicit QQnxNavigatorEventHandler(QObject *parent = nullptr); bool handleOrientationCheck(int angle); void handleOrientationChange(int angle); diff --git a/src/plugins/platforms/qnx/qqnxnavigatoreventnotifier.h b/src/plugins/platforms/qnx/qqnxnavigatoreventnotifier.h index 17c31c096c..a761faea1c 100644 --- a/src/plugins/platforms/qnx/qqnxnavigatoreventnotifier.h +++ b/src/plugins/platforms/qnx/qqnxnavigatoreventnotifier.h @@ -51,7 +51,7 @@ class QQnxNavigatorEventNotifier : public QObject { Q_OBJECT public: - explicit QQnxNavigatorEventNotifier(QQnxNavigatorEventHandler *eventHandler, QObject *parent = 0); + explicit QQnxNavigatorEventNotifier(QQnxNavigatorEventHandler *eventHandler, QObject *parent = nullptr); ~QQnxNavigatorEventNotifier(); public Q_SLOTS: diff --git a/src/plugins/platforms/qnx/qqnxnavigatorpps.h b/src/plugins/platforms/qnx/qqnxnavigatorpps.h index 3c818f51a6..c58903b6b6 100644 --- a/src/plugins/platforms/qnx/qqnxnavigatorpps.h +++ b/src/plugins/platforms/qnx/qqnxnavigatorpps.h @@ -50,7 +50,7 @@ class QQnxNavigatorPps : public QQnxAbstractNavigator { Q_OBJECT public: - explicit QQnxNavigatorPps(QObject *parent = 0); + explicit QQnxNavigatorPps(QObject *parent = nullptr); ~QQnxNavigatorPps(); protected: diff --git a/src/plugins/platforms/qnx/qqnxrasterbackingstore.cpp b/src/plugins/platforms/qnx/qqnxrasterbackingstore.cpp index e70092b97e..fe68927fda 100644 --- a/src/plugins/platforms/qnx/qqnxrasterbackingstore.cpp +++ b/src/plugins/platforms/qnx/qqnxrasterbackingstore.cpp @@ -89,7 +89,7 @@ void QQnxRasterBackingStore::flush(QWindow *window, const QRegion ®ion, const if (!m_needsPosting) return; - QQnxWindow *targetWindow = 0; + QQnxWindow *targetWindow = nullptr; if (window) targetWindow = static_cast<QQnxWindow *>(window->handle()); diff --git a/src/plugins/platforms/qnx/qqnxwindow.cpp b/src/plugins/platforms/qnx/qqnxwindow.cpp index 22a00d3d40..9d3b921c44 100644 --- a/src/plugins/platforms/qnx/qqnxwindow.cpp +++ b/src/plugins/platforms/qnx/qqnxwindow.cpp @@ -566,7 +566,7 @@ void QQnxWindow::removeFromParent() if (Q_UNLIKELY(!m_parentWindow->m_childWindows.removeAll(this))) qFatal("QQnxWindow: Window Hierarchy broken; window has parent, but parent hasn't got child."); else - m_parentWindow = 0; + m_parentWindow = nullptr; } else if (m_screen) { m_screen->removeWindow(this); } @@ -634,7 +634,7 @@ void QQnxWindow::lower() void QQnxWindow::requestActivateWindow() { - QQnxWindow *focusWindow = 0; + QQnxWindow *focusWindow = nullptr; if (QGuiApplication::focusWindow()) focusWindow = static_cast<QQnxWindow*>(QGuiApplication::focusWindow()->handle()); @@ -664,7 +664,7 @@ void QQnxWindow::requestActivateWindow() platformScreen->rootWindow()->m_windowGroupName == currentWindow->m_parentGroupName) { currentWindow = platformScreen->rootWindow(); } else { - currentWindow = 0; + currentWindow = nullptr; } } |