From ece0c0a5e7e0b18beb58ccd868bde54c7be64f78 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Fri, 22 Nov 2019 14:46:58 +0100 Subject: Tidy nullptr usage Move away from using 0 as pointer literal. Done using clang-tidy. This is not complete as run-clang-tidy can't handle all of qtbase in one go. Change-Id: I1076a21f32aac0dab078af6f175f7508145eece0 Reviewed-by: Friedemann Kleint Reviewed-by: Lars Knoll --- src/gui/accessible/qaccessible.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'src/gui/accessible/qaccessible.cpp') diff --git a/src/gui/accessible/qaccessible.cpp b/src/gui/accessible/qaccessible.cpp index db47a3abc1..7922d6fb06 100644 --- a/src/gui/accessible/qaccessible.cpp +++ b/src/gui/accessible/qaccessible.cpp @@ -478,15 +478,15 @@ Q_GLOBAL_STATIC(QAccessiblePluginsHash, qAccessiblePlugins) Q_GLOBAL_STATIC(QList, qAccessibleFactories) Q_GLOBAL_STATIC(QList, qAccessibleActivationObservers) -QAccessible::UpdateHandler QAccessible::updateHandler = 0; -QAccessible::RootObjectHandler QAccessible::rootObjectHandler = 0; +QAccessible::UpdateHandler QAccessible::updateHandler = nullptr; +QAccessible::RootObjectHandler QAccessible::rootObjectHandler = nullptr; static bool cleanupAdded = false; static QPlatformAccessibility *platformAccessibility() { QPlatformIntegration *pfIntegration = QGuiApplicationPrivate::platformIntegration(); - return pfIntegration ? pfIntegration->accessibility() : 0; + return pfIntegration ? pfIntegration->accessibility() : nullptr; } /*! @@ -673,7 +673,7 @@ void QAccessible::removeActivationObserver(ActivationObserver *observer) QAccessibleInterface *QAccessible::queryAccessibleInterface(QObject *object) { if (!object) - return 0; + return nullptr; if (Id id = QAccessibleCache::instance()->objectToId.value(object)) return QAccessibleCache::instance()->interfaceForId(id); @@ -696,7 +696,7 @@ QAccessibleInterface *QAccessible::queryAccessibleInterface(QObject *object) // Find a QAccessiblePlugin (factory) for the class name. If there's // no entry in the cache try to create it using the plugin loader. if (!qAccessiblePlugins()->contains(cn)) { - QAccessiblePlugin *factory = 0; // 0 means "no plugin found". This is cached as well. + QAccessiblePlugin *factory = nullptr; // 0 means "no plugin found". This is cached as well. const int index = loader()->indexOf(cn); if (index != -1) factory = qobject_cast(loader()->instance(index)); @@ -724,7 +724,7 @@ QAccessibleInterface *QAccessible::queryAccessibleInterface(QObject *object) return appInterface; } - return 0; + return nullptr; } /*! @@ -1113,7 +1113,7 @@ QAccessibleInterface::relations(QAccessible::Relation /*match = QAccessible::All */ QAccessibleInterface *QAccessibleInterface::focusChild() const { - return 0; + return nullptr; } /*! @@ -1758,12 +1758,12 @@ QAccessibleTextSelectionEvent::~QAccessibleTextSelectionEvent() */ QAccessibleInterface *QAccessibleEvent::accessibleInterface() const { - if (m_object == 0) + if (m_object == nullptr) return QAccessible::accessibleInterface(m_uniqueId); QAccessibleInterface *iface = QAccessible::queryAccessibleInterface(m_object); if (!iface || !iface->isValid()) - return 0; + return nullptr; if (m_child >= 0) { QAccessibleInterface *child = iface->child(m_child); @@ -1791,7 +1791,7 @@ QAccessibleInterface *QAccessibleEvent::accessibleInterface() const */ QWindow *QAccessibleInterface::window() const { - return 0; + return nullptr; } /*! -- cgit v1.2.3