diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-07-29 16:30:13 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-07-31 12:56:50 +0200 |
commit | 5747f3139219abd6c8670953620cee1f5584caba (patch) | |
tree | 07dda7644e3628ead8459efa304e36d705e36521 /src/gui/platform | |
parent | 4ed483b0e24b410b6bb240b48b4ad71e67877dc2 (diff) |
Another round of 0->nullptr cleanup
Change-Id: Ic8db7dc252f8fea46eb5a4f334726d6c7f4645a6
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
Diffstat (limited to 'src/gui/platform')
-rw-r--r-- | src/gui/platform/unix/qeventdispatcher_glib.cpp | 4 | ||||
-rw-r--r-- | src/gui/platform/unix/qgenericunixthemes.cpp | 18 |
2 files changed, 11 insertions, 11 deletions
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<QPalette *>(0)); - std::fill(fonts, fonts + QPlatformTheme::NFonts, static_cast<QFont *>(0)); + std::fill(palettes, palettes + QPlatformTheme::NPalettes, static_cast<QPalette *>(nullptr)); + std::fill(fonts, fonts + QPlatformTheme::NFonts, static_cast<QFont *>(nullptr)); } void ResourceHelper::clear() { qDeleteAll(palettes, palettes + QPlatformTheme::NPalettes); qDeleteAll(fonts, fonts + QPlatformTheme::NFonts); - std::fill(palettes, palettes + QPlatformTheme::NPalettes, static_cast<QPalette *>(0)); - std::fill(fonts, fonts + QPlatformTheme::NFonts, static_cast<QFont *>(0)); + std::fill(palettes, palettes + QPlatformTheme::NPalettes, static_cast<QPalette *>(nullptr)); + std::fill(fonts, fonts + QPlatformTheme::NFonts, static_cast<QFont *>(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; } } |