From 5747f3139219abd6c8670953620cee1f5584caba Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Wed, 29 Jul 2020 16:30:13 +0200 Subject: Another round of 0->nullptr cleanup Change-Id: Ic8db7dc252f8fea46eb5a4f334726d6c7f4645a6 Reviewed-by: Sona Kurazyan --- src/gui/platform/unix/qeventdispatcher_glib.cpp | 4 ++-- src/gui/platform/unix/qgenericunixthemes.cpp | 18 +++++++++--------- 2 files changed, 11 insertions(+), 11 deletions(-) (limited to 'src/gui/platform') diff --git a/src/gui/platform/unix/qeventdispatcher_glib.cpp b/src/gui/platform/unix/qeventdispatcher_glib.cpp index 42b66af686..eaa27de25c 100644 --- a/src/gui/platform/unix/qeventdispatcher_glib.cpp +++ b/src/gui/platform/unix/qeventdispatcher_glib.cpp @@ -64,7 +64,7 @@ static gboolean userEventSourcePrepare(GSource *source, gint *timeout) static gboolean userEventSourceCheck(GSource *source) { - return userEventSourcePrepare(source, 0); + return userEventSourcePrepare(source, nullptr); } static gboolean userEventSourceDispatch(GSource *source, GSourceFunc, gpointer) @@ -111,7 +111,7 @@ QPAEventDispatcherGlib::~QPAEventDispatcherGlib() g_source_destroy(&d->userEventSource->source); g_source_unref(&d->userEventSource->source); - d->userEventSource = 0; + d->userEventSource = nullptr; } bool QPAEventDispatcherGlib::processEvents(QEventLoop::ProcessEventsFlags flags) diff --git a/src/gui/platform/unix/qgenericunixthemes.cpp b/src/gui/platform/unix/qgenericunixthemes.cpp index 352c975400..92bf4a14ec 100644 --- a/src/gui/platform/unix/qgenericunixthemes.cpp +++ b/src/gui/platform/unix/qgenericunixthemes.cpp @@ -80,16 +80,16 @@ Q_DECLARE_LOGGING_CATEGORY(qLcTray) ResourceHelper::ResourceHelper() { - std::fill(palettes, palettes + QPlatformTheme::NPalettes, static_cast(0)); - std::fill(fonts, fonts + QPlatformTheme::NFonts, static_cast(0)); + std::fill(palettes, palettes + QPlatformTheme::NPalettes, static_cast(nullptr)); + std::fill(fonts, fonts + QPlatformTheme::NFonts, static_cast(nullptr)); } void ResourceHelper::clear() { qDeleteAll(palettes, palettes + QPlatformTheme::NPalettes); qDeleteAll(fonts, fonts + QPlatformTheme::NFonts); - std::fill(palettes, palettes + QPlatformTheme::NPalettes, static_cast(0)); - std::fill(fonts, fonts + QPlatformTheme::NFonts, static_cast(0)); + std::fill(palettes, palettes + QPlatformTheme::NPalettes, static_cast(nullptr)); + std::fill(fonts, fonts + QPlatformTheme::NFonts, static_cast(nullptr)); } const char *QGenericUnixTheme::name = "generic"; @@ -162,7 +162,7 @@ const QFont *QGenericUnixTheme::font(Font type) const case QPlatformTheme::FixedFont: return &d->fixedFont; default: - return 0; + return nullptr; } } @@ -532,7 +532,7 @@ QFont *QKdeThemePrivate::kdeFont(const QVariant &fontValue) return new QFont(font); } } - return 0; + return nullptr; } @@ -621,7 +621,7 @@ QPlatformTheme *QKdeTheme::createKdeTheme() const QByteArray kdeVersionBA = qgetenv("KDE_SESSION_VERSION"); const int kdeVersion = kdeVersionBA.toInt(); if (kdeVersion < 4) - return 0; + return nullptr; if (kdeVersion > 4) // Plasma 5 follows XDG spec @@ -665,7 +665,7 @@ QPlatformTheme *QKdeTheme::createKdeTheme() kdeDirs.removeDuplicates(); if (kdeDirs.isEmpty()) { qWarning("Unable to determine KDE dirs"); - return 0; + return nullptr; } return new QKdeTheme(kdeDirs, kdeVersion); @@ -782,7 +782,7 @@ const QFont *QGnomeTheme::font(Font type) const case QPlatformTheme::FixedFont: return d->fixedFont; default: - return 0; + return nullptr; } } -- cgit v1.2.3