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/ios | |
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/ios')
6 files changed, 15 insertions, 15 deletions
diff --git a/src/plugins/platforms/ios/optional/nsphotolibrarysupport/plugin.mm b/src/plugins/platforms/ios/optional/nsphotolibrarysupport/plugin.mm index 8b372b8749..2a3d8c603e 100644 --- a/src/plugins/platforms/ios/optional/nsphotolibrarysupport/plugin.mm +++ b/src/plugins/platforms/ios/optional/nsphotolibrarysupport/plugin.mm @@ -52,7 +52,7 @@ class QIosOptionalPlugin_NSPhotoLibrary : public QObject, QIosOptionalPluginInte Q_INTERFACES(QIosOptionalPluginInterface) public: - explicit QIosOptionalPlugin_NSPhotoLibrary(QObject* = 0) {}; + explicit QIosOptionalPlugin_NSPhotoLibrary(QObject * = nullptr) {}; ~QIosOptionalPlugin_NSPhotoLibrary() {} UIViewController* createImagePickerController(QIOSFileDialog *fileDialog) const override diff --git a/src/plugins/platforms/ios/optional/nsphotolibrarysupport/qiosfileengineassetslibrary.mm b/src/plugins/platforms/ios/optional/nsphotolibrarysupport/qiosfileengineassetslibrary.mm index c5244a51ad..01524a00e8 100644 --- a/src/plugins/platforms/ios/optional/nsphotolibrarysupport/qiosfileengineassetslibrary.mm +++ b/src/plugins/platforms/ios/optional/nsphotolibrarysupport/qiosfileengineassetslibrary.mm @@ -54,7 +54,7 @@ static QThreadStorage<QString> g_iteratorCurrentUrl; static QThreadStorage<QPointer<QIOSAssetData> > g_assetDataCache; static const int kBufferSize = 10; -static ALAsset *kNoAsset = 0; +static ALAsset *kNoAsset = nullptr; static bool ensureAuthorizationDialogNotBlocked() { @@ -366,7 +366,7 @@ bool QIOSFileEngineAssetsLibrary::close() // Delete later, so that we can reuse the asset if a QFile is // opened with the same path during the same event loop cycle. m_data->deleteLater(); - m_data = 0; + m_data = nullptr; } return true; } @@ -410,7 +410,7 @@ qint64 QIOSFileEngineAssetsLibrary::read(char *data, qint64 maxlen) if (!bytesRead) return 0; - NSError *error = 0; + NSError *error = nullptr; [[asset defaultRepresentation] getBytes:(uint8_t *)data fromOffset:m_offset length:bytesRead error:&error]; if (error) { diff --git a/src/plugins/platforms/ios/qioseventdispatcher.h b/src/plugins/platforms/ios/qioseventdispatcher.h index 1f4c78dc74..cdbaa0931d 100644 --- a/src/plugins/platforms/ios/qioseventdispatcher.h +++ b/src/plugins/platforms/ios/qioseventdispatcher.h @@ -53,7 +53,7 @@ public: bool processPostedEvents() override; protected: - explicit QIOSEventDispatcher(QObject *parent = 0); + explicit QIOSEventDispatcher(QObject *parent = nullptr); }; class QIOSJumpingEventDispatcher : public QIOSEventDispatcher @@ -61,7 +61,7 @@ class QIOSJumpingEventDispatcher : public QIOSEventDispatcher Q_OBJECT public: - QIOSJumpingEventDispatcher(QObject *parent = 0); + QIOSJumpingEventDispatcher(QObject *parent = nullptr); bool processEvents(QEventLoop::ProcessEventsFlags flags) override; // Public since we can't friend Objective-C methods @@ -76,4 +76,4 @@ private: QT_END_NAMESPACE -#endif // QIOSEVENTDISPATCHER_H
\ No newline at end of file +#endif // QIOSEVENTDISPATCHER_H diff --git a/src/plugins/platforms/ios/qiosglobal.mm b/src/plugins/platforms/ios/qiosglobal.mm index a523d1be45..c0428dacb9 100644 --- a/src/plugins/platforms/ios/qiosglobal.mm +++ b/src/plugins/platforms/ios/qiosglobal.mm @@ -185,7 +185,7 @@ FirstResponderCandidate::FirstResponderCandidate(UIResponder *responder) { } -UIResponder *FirstResponderCandidate::s_firstResponderCandidate = 0; +UIResponder *FirstResponderCandidate::s_firstResponderCandidate = nullptr; QT_END_NAMESPACE diff --git a/src/plugins/platforms/ios/qiosinputcontext.h b/src/plugins/platforms/ios/qiosinputcontext.h index c59c5328af..36421a57c3 100644 --- a/src/plugins/platforms/ios/qiosinputcontext.h +++ b/src/plugins/platforms/ios/qiosinputcontext.h @@ -111,7 +111,7 @@ public: void scrollToCursor(); void scroll(int y); - void updateKeyboardState(NSNotification *notification = 0); + void updateKeyboardState(NSNotification *notification = nullptr); const ImeState &imeState() { return m_imeState; } const KeyboardState &keyboardState() { return m_keyboardState; } diff --git a/src/plugins/platforms/ios/qiosmenu.mm b/src/plugins/platforms/ios/qiosmenu.mm index 74a77de757..737d7798ab 100644 --- a/src/plugins/platforms/ios/qiosmenu.mm +++ b/src/plugins/platforms/ios/qiosmenu.mm @@ -54,7 +54,7 @@ // m_currentMenu points to the currently visible menu. // Only one menu will be visible at a time, and if a second menu // is shown on top of a first, the first one will be told to hide. -QIOSMenu *QIOSMenu::m_currentMenu = 0; +QIOSMenu *QIOSMenu::m_currentMenu = nullptr; // ------------------------------------------------------------------------- @@ -441,7 +441,7 @@ void QIOSMenu::dismiss() break; } - m_currentMenu = 0; + m_currentMenu = nullptr; m_visible = false; } @@ -458,13 +458,13 @@ void QIOSMenu::toggleShowUsingUIMenuController(bool show) Q_ASSERT(m_menuController); [[UIMenuController sharedMenuController] setMenuVisible:NO animated:YES]; [m_menuController release]; - m_menuController = 0; + m_menuController = nullptr; } } void QIOSMenu::toggleShowUsingUIPickerView(bool show) { - static QObject *focusObjectWithPickerView = 0; + static QObject *focusObjectWithPickerView = nullptr; if (show) { Q_ASSERT(!m_pickerView); @@ -477,12 +477,12 @@ void QIOSMenu::toggleShowUsingUIPickerView(bool show) } else { Q_ASSERT(focusObjectWithPickerView); focusObjectWithPickerView->removeEventFilter(this); - focusObjectWithPickerView = 0; + focusObjectWithPickerView = nullptr; Q_ASSERT(m_pickerView); [m_pickerView listenForKeyboardWillHideNotification:NO]; [m_pickerView release]; - m_pickerView = 0; + m_pickerView = nullptr; qApp->inputMethod()->update(Qt::ImEnabled | Qt::ImPlatformData); } |