summaryrefslogtreecommitdiffstats
path: root/src/plugins/platformthemes/gtk3/qgtk3theme.cpp
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2019-11-22 14:46:58 +0100
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2019-12-06 12:13:20 +0100
commitece0c0a5e7e0b18beb58ccd868bde54c7be64f78 (patch)
treefa4a0fdbda040d24f1a2d07a320635c76980f431 /src/plugins/platformthemes/gtk3/qgtk3theme.cpp
parentb19220d17fa66de5ded41690ffff263ee2af5c63 (diff)
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 <Friedemann.Kleint@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/plugins/platformthemes/gtk3/qgtk3theme.cpp')
-rw-r--r--src/plugins/platformthemes/gtk3/qgtk3theme.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/plugins/platformthemes/gtk3/qgtk3theme.cpp b/src/plugins/platformthemes/gtk3/qgtk3theme.cpp
index 077955eb4e..93520344f8 100644
--- a/src/plugins/platformthemes/gtk3/qgtk3theme.cpp
+++ b/src/plugins/platformthemes/gtk3/qgtk3theme.cpp
@@ -86,9 +86,9 @@ QGtk3Theme::QGtk3Theme()
{
// gtk_init will reset the Xlib error handler, and that causes
// Qt applications to quit on X errors. Therefore, we need to manually restore it.
- int (*oldErrorHandler)(Display *, XErrorEvent *) = XSetErrorHandler(NULL);
+ int (*oldErrorHandler)(Display *, XErrorEvent *) = XSetErrorHandler(nullptr);
- gtk_init(0, 0);
+ gtk_init(nullptr, nullptr);
XSetErrorHandler(oldErrorHandler);
@@ -99,7 +99,7 @@ QGtk3Theme::QGtk3Theme()
g_type_ensure(PANGO_TYPE_FONT_FACE);
/* Use our custom log handler. */
- g_log_set_handler("Gtk", G_LOG_LEVEL_MESSAGE, gtkMessageHandler, NULL);
+ g_log_set_handler("Gtk", G_LOG_LEVEL_MESSAGE, gtkMessageHandler, nullptr);
}
static inline QVariant gtkGetLongPressTime()
@@ -173,7 +173,7 @@ QPlatformDialogHelper *QGtk3Theme::createPlatformDialogHelper(DialogType type) c
case FontDialog:
return new QGtk3FontDialogHelper;
default:
- return 0;
+ return nullptr;
}
}
@@ -197,7 +197,7 @@ bool QGtk3Theme::useNativeFileDialog()
* dialogs entirely since we can't avoid creation of a platform
* dialog helper.
*/
- return gtk_check_version(3, 15, 5) == 0;
+ return gtk_check_version(3, 15, 5) == nullptr;
}
QT_END_NAMESPACE