summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKevin Funk <kevin.funk@kdab.com>2019-03-12 11:46:26 +0100
committerKevin Funk <kevin.funk@kdab.com>2019-03-14 07:37:52 +0000
commit41e7b71c410b77a81d09d3cc2e169ffd7975b4d2 (patch)
treefd0722a70d1aedf8567cc11babd10adcbbd1e797 /src
parentb35eec360d4d88d094094fb54c101fad6cee5768 (diff)
More nullptr usage in headers
Diff generated by running clang-tidy's modernize-use-nullptr checker on the CMake-based Qt version. Skipping src/3rdparty, examples/, tests/ Change-Id: Ib182074e2e2fd52f63093f73b3e2e4c0cb7af188 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/concurrent/qtconcurrentcompilertest.h2
-rw-r--r--src/concurrent/qtconcurrentfilterkernel.h2
-rw-r--r--src/concurrent/qtconcurrentmapkernel.h2
-rw-r--r--src/corelib/animation/qabstractanimation_p.h2
-rw-r--r--src/corelib/animation/qanimationgroup_p.h2
-rw-r--r--src/corelib/animation/qpropertyanimation_p.h2
-rw-r--r--src/corelib/animation/qsequentialanimationgroup_p.h2
-rw-r--r--src/corelib/codecs/qtextcodec_p.h2
-rw-r--r--src/corelib/global/qglobalstatic.h4
-rw-r--r--src/corelib/io/qabstractfileengine_p.h2
-rw-r--r--src/corelib/io/qfileinfo_p.h2
-rw-r--r--src/corelib/io/qfilesystemengine_p.h2
-rw-r--r--src/corelib/io/qfilesystemmetadata_p.h4
-rw-r--r--src/corelib/io/qfsfileengine_p.h2
-rw-r--r--src/corelib/io/qprocess_p.h2
-rw-r--r--src/corelib/io/qresource_p.h2
-rw-r--r--src/corelib/io/qurl_p.h2
-rw-r--r--src/corelib/itemmodels/qabstractitemmodel_p.h2
-rw-r--r--src/corelib/itemmodels/qabstractproxymodel_p.h2
-rw-r--r--src/corelib/itemmodels/qitemselectionmodel_p.h2
-rw-r--r--src/corelib/kernel/qcore_unix_p.h2
-rw-r--r--src/corelib/kernel/qcoreapplication_p.h2
-rw-r--r--src/corelib/kernel/qeventdispatcher_glib_p.h6
-rw-r--r--src/corelib/kernel/qeventdispatcher_unix_p.h10
-rw-r--r--src/corelib/kernel/qmetaobject_moc_p.h4
-rw-r--r--src/corelib/kernel/qmetaobject_p.h4
-rw-r--r--src/corelib/kernel/qmetaobjectbuilder_p.h8
-rw-r--r--src/corelib/kernel/qsharedmemory_p.h2
-rw-r--r--src/corelib/kernel/qvariant_p.h10
-rw-r--r--src/corelib/plugin/qlibrary_p.h2
-rw-r--r--src/corelib/serialization/qjson_p.h4
-rw-r--r--src/corelib/serialization/qxmlstream_p.h10
-rw-r--r--src/corelib/statemachine/qstate_p.h8
-rw-r--r--src/corelib/statemachine/qstatemachine_p.h4
-rw-r--r--src/corelib/thread/qatomic_bootstrap.h2
-rw-r--r--src/corelib/thread/qresultstore.h4
-rw-r--r--src/corelib/thread/qthread_p.h12
-rw-r--r--src/corelib/thread/qthreadpool_p.h2
-rw-r--r--src/corelib/thread/qthreadstorage.h4
-rw-r--r--src/corelib/tools/qcache.h14
-rw-r--r--src/corelib/tools/qdatetime_p.h2
-rw-r--r--src/corelib/tools/qdatetimeparser_p.h8
-rw-r--r--src/corelib/tools/qfreelist_p.h4
-rw-r--r--src/corelib/tools/qlist.h2
-rw-r--r--src/corelib/tools/qlocale_p.h2
-rw-r--r--src/dbus/qdbusargument_p.h6
-rw-r--r--src/dbus/qdbusconnection_p.h10
-rw-r--r--src/dbus/qdbusintegrator_p.h6
-rw-r--r--src/dbus/qdbuspendingcall_p.h2
-rw-r--r--src/dbus/qdbuspendingreply.h2
-rw-r--r--src/dbus/qdbusutil_p.h2
-rw-r--r--src/gui/accessible/qaccessiblecache_p.h2
-rw-r--r--src/gui/image/qimage_p.h2
-rw-r--r--src/gui/image/qpixmapcache_p.h2
-rw-r--r--src/gui/image/qppmhandler_p.h2
-rw-r--r--src/gui/itemmodels/qstandarditemmodel_p.h12
-rw-r--r--src/gui/kernel/qdnd_p.h6
-rw-r--r--src/gui/kernel/qguiapplication_p.h4
-rw-r--r--src/gui/kernel/qinputmethod_p.h2
-rw-r--r--src/gui/kernel/qopenglcontext_p.h22
-rw-r--r--src/gui/kernel/qplatformintegration.h2
-rw-r--r--src/gui/kernel/qplatformtheme.h2
-rw-r--r--src/gui/kernel/qscreen_p.h4
-rw-r--r--src/gui/kernel/qshapedpixmapdndwindow_p.h2
-rw-r--r--src/gui/kernel/qwindow_p.h10
-rw-r--r--src/gui/kernel/qwindowsysteminterface_p.h10
-rw-r--r--src/gui/opengl/qopenglengineshadermanager_p.h2
-rw-r--r--src/gui/opengl/qopenglextensions_p.h2
-rw-r--r--src/gui/opengl/qopenglframebufferobject_p.h8
-rw-r--r--src/gui/opengl/qopenglpaintengine_p.h8
-rw-r--r--src/gui/opengl/qopenglqueryhelper_p.h24
-rw-r--r--src/gui/opengl/qopengltextureglyphcache_p.h2
-rw-r--r--src/gui/opengl/qopengltexturehelper_p.h18
-rw-r--r--src/gui/painting/qcosmeticstroker_p.h4
-rw-r--r--src/gui/painting/qdatabuffer_p.h4
-rw-r--r--src/gui/painting/qdrawhelper_p.h2
-rw-r--r--src/gui/painting/qoutlinemapper_p.h4
-rw-r--r--src/gui/painting/qpaintengine_p.h6
-rw-r--r--src/gui/painting/qpaintengine_raster_p.h2
-rw-r--r--src/gui/painting/qpainter_p.h6
-rw-r--r--src/gui/painting/qpainterpath_p.h4
-rw-r--r--src/gui/painting/qpathclipper_p.h12
-rw-r--r--src/gui/painting/qplatformbackingstore.h4
-rw-r--r--src/gui/painting/qrbtree_p.h14
-rw-r--r--src/gui/painting/qtextureglyphcache_p.h2
-rw-r--r--src/gui/painting/qvectorpath_p.h8
-rw-r--r--src/gui/text/qabstracttextdocumentlayout_p.h6
-rw-r--r--src/gui/text/qcssparser_p.h12
-rw-r--r--src/gui/text/qdistancefield_p.h2
-rw-r--r--src/gui/text/qfont_p.h2
-rw-r--r--src/gui/text/qfontengine_p.h8
-rw-r--r--src/gui/text/qfragmentmap_p.h2
-rw-r--r--src/gui/text/qglyphrun_p.h2
-rw-r--r--src/gui/text/qrawfont_p.h22
-rw-r--r--src/gui/text/qstatictext_p.h2
-rw-r--r--src/gui/text/qtextdocument_p.h4
-rw-r--r--src/gui/text/qtextdocumentfragment_p.h6
-rw-r--r--src/gui/text/qtextengine_p.h14
-rw-r--r--src/gui/text/qtextimagehandler_p.h2
-rw-r--r--src/gui/text/qtextobject_p.h2
-rw-r--r--src/gui/text/qtexttable_p.h2
-rw-r--r--src/gui/util/qgridlayoutengine_p.h8
-rw-r--r--src/gui/vulkan/qvulkanwindow_p.h2
-rw-r--r--src/network/access/qftp_p.h4
-rw-r--r--src/network/access/qhttpmultipart_p.h2
-rw-r--r--src/network/access/qhttpnetworkconnection_p.h4
-rw-r--r--src/network/access/qhttpnetworkreply_p.h2
-rw-r--r--src/network/access/qhttpthreaddelegate_p.h10
-rw-r--r--src/network/access/qnetworkaccessauthenticationmanager_p.h4
-rw-r--r--src/network/access/qnetworkdiskcache_p.h4
-rw-r--r--src/network/access/qnetworkreplyimpl_p.h2
-rw-r--r--src/network/bearer/qbearerengine_p.h2
-rw-r--r--src/network/bearer/qbearerplugin_p.h2
-rw-r--r--src/network/kernel/qdnslookup_p.h2
-rw-r--r--src/network/kernel/qhostinfo_p.h2
-rw-r--r--src/network/kernel/qnetworkinterface_p.h2
-rw-r--r--src/network/kernel/qnetworkinterface_unix_p.h2
-rw-r--r--src/network/socket/qabstractsocketengine_p.h12
-rw-r--r--src/network/socket/qhttpsocketengine_p.h8
-rw-r--r--src/network/socket/qlocalserver_p.h2
-rw-r--r--src/network/socket/qnativesocketengine_p.h10
-rw-r--r--src/network/socket/qsocks5socketengine_p.h10
-rw-r--r--src/network/ssl/qasn1element_p.h4
-rw-r--r--src/network/ssl/qsslcertificate_p.h2
-rw-r--r--src/network/ssl/qsslcontext_openssl_p.h2
-rw-r--r--src/network/ssl/qsslkey_p.h2
-rw-r--r--src/opengl/gl2paintengineex/qglengineshadermanager_p.h2
-rw-r--r--src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h4
-rw-r--r--src/opengl/gl2paintengineex/qtextureglyphcache_gl_p.h2
-rw-r--r--src/opengl/qgl_p.h12
-rw-r--r--src/opengl/qglframebufferobject_p.h6
-rw-r--r--src/opengl/qglpixelbuffer_p.h2
-rw-r--r--src/opengl/qgraphicsshadereffect_p.h2
-rw-r--r--src/platformheaders/nativecontexts/qeglnativecontext.h4
-rw-r--r--src/platformsupport/devicediscovery/qdevicediscovery_p.h2
-rw-r--r--src/platformsupport/devicediscovery/qdevicediscovery_udev_p.h2
-rw-r--r--src/platformsupport/eglconvenience/qeglpbuffer_p.h2
-rw-r--r--src/platformsupport/eglconvenience/qeglplatformcontext_p.h4
-rw-r--r--src/platformsupport/eventdispatchers/qeventdispatcher_glib_p.h4
-rw-r--r--src/platformsupport/eventdispatchers/qunixeventdispatcher_qpa_p.h2
-rw-r--r--src/platformsupport/fbconvenience/qfbvthandler_p.h2
-rw-r--r--src/platformsupport/fontdatabases/freetype/qfontengine_ft_p.h2
-rw-r--r--src/platformsupport/input/evdevkeyboard/qevdevkeyboardmanager_p.h2
-rw-r--r--src/platformsupport/input/evdevmouse/qevdevmousemanager_p.h2
-rw-r--r--src/platformsupport/input/evdevtablet/qevdevtablethandler_p.h4
-rw-r--r--src/platformsupport/input/evdevtablet/qevdevtabletmanager_p.h2
-rw-r--r--src/platformsupport/input/evdevtouch/qevdevtouchmanager_p.h2
-rw-r--r--src/platformsupport/input/libinput/qlibinputtouch_p.h2
-rw-r--r--src/platformsupport/linuxaccessibility/atspiadaptor_p.h2
-rw-r--r--src/platformsupport/linuxaccessibility/cache_p.h2
-rw-r--r--src/platformsupport/linuxaccessibility/dbusconnection_p.h2
-rw-r--r--src/platformsupport/themes/genericunix/dbusmenu/qdbusmenuconnection_p.h2
-rw-r--r--src/platformsupport/themes/genericunix/dbustray/qxdgnotificationproxy_p.h2
-rw-r--r--src/platformsupport/themes/genericunix/qgenericunixthemes_p.h4
-rw-r--r--src/plugins/bearer/connman/qconnmanengine.h2
-rw-r--r--src/plugins/bearer/connman/qconnmanservice_linux_p.h6
-rw-r--r--src/plugins/bearer/generic/qgenericengine.h2
-rw-r--r--src/plugins/bearer/linux_common/qofonoservice_linux_p.h10
-rw-r--r--src/plugins/bearer/networkmanager/qnetworkmanagerengine.h4
-rw-r--r--src/plugins/bearer/networkmanager/qnetworkmanagerservice.h22
-rw-r--r--src/plugins/bearer/qbearerengine_impl.h2
-rw-r--r--src/plugins/bearer/qnetworksession_impl.h2
-rw-r--r--src/plugins/platforminputcontexts/ibus/qibusinputcontextproxy.h2
-rw-r--r--src/plugins/platforminputcontexts/ibus/qibusplatforminputcontext.h6
-rw-r--r--src/plugins/platforminputcontexts/ibus/qibusproxy.h2
-rw-r--r--src/plugins/platforms/vnc/qvnc_p.h2
-rw-r--r--src/plugins/platforms/vnc/qvncscreen.h6
-rw-r--r--src/plugins/platforms/xcb/gl_integrations/qxcbglintegrationplugin.h2
-rw-r--r--src/plugins/platforms/xcb/qxcbconnection.h4
-rw-r--r--src/plugins/platforms/xcb/qxcbcursor.h2
-rw-r--r--src/plugins/platforms/xcb/qxcbdrag.h4
-rw-r--r--src/plugins/platforms/xcb/qxcbobject.h2
-rw-r--r--src/plugins/platforms/xcb/qxcbwindow.h2
-rw-r--r--src/plugins/platformthemes/xdgdesktopportal/qxdgdesktopportaltheme.h2
-rw-r--r--src/plugins/sqldrivers/odbc/qsql_odbc_p.h4
-rw-r--r--src/plugins/sqldrivers/sqlite/qsql_sqlite_p.h4
-rw-r--r--src/sql/models/qsqlquerymodel_p.h2
-rw-r--r--src/sql/models/qsqltablemodel_p.h2
-rw-r--r--src/testlib/qabstracttestlogger_p.h6
-rw-r--r--src/testlib/qcsvbenchmarklogger_p.h4
-rw-r--r--src/testlib/qplaintestlogger_p.h6
-rw-r--r--src/testlib/qsignalspy.h2
-rw-r--r--src/testlib/qtaptestlogger_p.h4
-rw-r--r--src/testlib/qteamcitylogger_p.h4
-rw-r--r--src/testlib/qtestcoreelement_p.h10
-rw-r--r--src/testlib/qtestcorelist_p.h8
-rw-r--r--src/testlib/qxmltestlogger_p.h4
-rw-r--r--src/testlib/qxunittestlogger_p.h4
-rw-r--r--src/tools/moc/generator.h2
-rw-r--r--src/tools/moc/parser.h6
-rw-r--r--src/tools/uic/driver.h4
-rw-r--r--src/widgets/dialogs/qdialog_p.h10
-rw-r--r--src/widgets/dialogs/qfiledialog_p.h8
-rw-r--r--src/widgets/dialogs/qfileinfogatherer_p.h2
-rw-r--r--src/widgets/dialogs/qfilesystemmodel_p.h12
-rw-r--r--src/widgets/dialogs/qfscompleter_p.h4
-rw-r--r--src/widgets/dialogs/qsidebar_p.h6
-rw-r--r--src/widgets/effects/qgraphicseffect_p.h8
-rw-r--r--src/widgets/effects/qpixmapfilter_p.h8
-rw-r--r--src/widgets/graphicsview/qgraphicsanchorlayout_p.h12
-rw-r--r--src/widgets/graphicsview/qgraphicsgridlayoutengine_p.h4
-rw-r--r--src/widgets/graphicsview/qgraphicsitem_p.h28
-rw-r--r--src/widgets/graphicsview/qgraphicslayout_p.h4
-rw-r--r--src/widgets/graphicsview/qgraphicslayoutstyleinfo_p.h2
-rw-r--r--src/widgets/graphicsview/qgraphicsscene_p.h8
-rw-r--r--src/widgets/graphicsview/qgraphicsscenebsptreeindex_p.h2
-rw-r--r--src/widgets/graphicsview/qgraphicssceneindex_p.h2
-rw-r--r--src/widgets/graphicsview/qgraphicsscenelinearindex_p.h2
-rw-r--r--src/widgets/graphicsview/qgraphicstransform_p.h2
-rw-r--r--src/widgets/graphicsview/qgraphicswidget_p.h2
-rw-r--r--src/widgets/graphicsview/qsimplex_p.h2
-rw-r--r--src/widgets/itemviews/qcolumnview_p.h4
-rw-r--r--src/widgets/itemviews/qcolumnviewgrip_p.h4
-rw-r--r--src/widgets/itemviews/qheaderview_p.h2
-rw-r--r--src/widgets/itemviews/qlistview_p.h2
-rw-r--r--src/widgets/itemviews/qtableview_p.h2
-rw-r--r--src/widgets/itemviews/qtreeview_p.h4
-rw-r--r--src/widgets/itemviews/qtreewidget_p.h4
-rw-r--r--src/widgets/kernel/qapplication_p.h8
-rw-r--r--src/widgets/kernel/qgesture_p.h2
-rw-r--r--src/widgets/kernel/qlayout_p.h2
-rw-r--r--src/widgets/kernel/qlayoutengine_p.h6
-rw-r--r--src/widgets/kernel/qwidget_p.h32
-rw-r--r--src/widgets/kernel/qwidgetbackingstore_p.h6
-rw-r--r--src/widgets/kernel/qwindowcontainer_p.h2
-rw-r--r--src/widgets/statemachine/qbasickeyeventtransition_p.h6
-rw-r--r--src/widgets/statemachine/qbasicmouseeventtransition_p.h4
-rw-r--r--src/widgets/styles/qcommonstyle_p.h2
-rw-r--r--src/widgets/styles/qfusionstyle_p.h18
-rw-r--r--src/widgets/styles/qpixmapstyle_p.h2
-rw-r--r--src/widgets/styles/qproxystyle_p.h2
-rw-r--r--src/widgets/styles/qstyle_p.h2
-rw-r--r--src/widgets/styles/qstylehelper_p.h4
-rw-r--r--src/widgets/styles/qstylesheetstyle_p.h32
-rw-r--r--src/widgets/styles/qwindowsstyle_p.h22
-rw-r--r--src/widgets/styles/qwindowsstyle_p_p.h4
-rw-r--r--src/widgets/util/qcompleter_p.h2
-rw-r--r--src/widgets/util/qflickgesture_p.h2
-rw-r--r--src/widgets/util/qundostack_p.h4
-rw-r--r--src/widgets/widgets/qabstractslider_p.h2
-rw-r--r--src/widgets/widgets/qabstractspinbox_p.h2
-rw-r--r--src/widgets/widgets/qcombobox_p.h4
-rw-r--r--src/widgets/widgets/qdatetimeedit_p.h4
-rw-r--r--src/widgets/widgets/qdockarealayout_p.h2
-rw-r--r--src/widgets/widgets/qdockwidget_p.h12
-rw-r--r--src/widgets/widgets/qlineedit_p.h4
-rw-r--r--src/widgets/widgets/qmainwindowlayout_p.h6
-rw-r--r--src/widgets/widgets/qmdiarea_p.h4
-rw-r--r--src/widgets/widgets/qmdisubwindow_p.h8
-rw-r--r--src/widgets/widgets/qmenu_p.h8
-rw-r--r--src/widgets/widgets/qmenubar_p.h4
-rw-r--r--src/widgets/widgets/qscrollarea_p.h2
-rw-r--r--src/widgets/widgets/qsplitter_p.h6
-rw-r--r--src/widgets/widgets/qtabbar_p.h4
-rw-r--r--src/widgets/widgets/qtoolbar_p.h2
-rw-r--r--src/widgets/widgets/qtoolbararealayout_p.h2
-rw-r--r--src/widgets/widgets/qtoolbarlayout_p.h2
-rw-r--r--src/widgets/widgets/qwidgetlinecontrol_p.h4
-rw-r--r--src/widgets/widgets/qwidgetresizehandler_p.h2
-rw-r--r--src/widgets/widgets/qwidgettextcontrol_p.h18
-rw-r--r--src/widgets/widgets/qwidgettextcontrol_p_p.h4
261 files changed, 641 insertions, 641 deletions
diff --git a/src/concurrent/qtconcurrentcompilertest.h b/src/concurrent/qtconcurrentcompilertest.h
index cddfd06ca1..72cf1670a0 100644
--- a/src/concurrent/qtconcurrentcompilertest.h
+++ b/src/concurrent/qtconcurrentcompilertest.h
@@ -52,7 +52,7 @@ template<class T>
class HasResultType {
typedef char Yes;
typedef void *No;
- template<typename U> static Yes test(int, const typename U::result_type * = 0);
+ template<typename U> static Yes test(int, const typename U::result_type * = nullptr);
template<typename U> static No test(double);
public:
enum { Value = (sizeof(test<T>(0)) == sizeof(Yes)) };
diff --git a/src/concurrent/qtconcurrentfilterkernel.h b/src/concurrent/qtconcurrentfilterkernel.h
index 9cbea2e671..e921a3d51a 100644
--- a/src/concurrent/qtconcurrentfilterkernel.h
+++ b/src/concurrent/qtconcurrentfilterkernel.h
@@ -266,7 +266,7 @@ public:
if (keep(*it))
this->reportResult(&(*it), index);
else
- this->reportResult(0, index);
+ this->reportResult(nullptr, index);
return false;
}
diff --git a/src/concurrent/qtconcurrentmapkernel.h b/src/concurrent/qtconcurrentmapkernel.h
index 3424124118..87fcf30cf9 100644
--- a/src/concurrent/qtconcurrentmapkernel.h
+++ b/src/concurrent/qtconcurrentmapkernel.h
@@ -74,7 +74,7 @@ public:
Iterator it = sequenceBeginIterator;
std::advance(it, beginIndex);
for (int i = beginIndex; i < endIndex; ++i) {
- runIteration(it, i, 0);
+ runIteration(it, i, nullptr);
std::advance(it, 1);
}
diff --git a/src/corelib/animation/qabstractanimation_p.h b/src/corelib/animation/qabstractanimation_p.h
index 3b6e8d6cc4..037d3be74f 100644
--- a/src/corelib/animation/qabstractanimation_p.h
+++ b/src/corelib/animation/qabstractanimation_p.h
@@ -78,7 +78,7 @@ public:
hasRegisteredTimer(false),
isPause(false),
isGroup(false),
- group(0)
+ group(nullptr)
{
}
diff --git a/src/corelib/animation/qanimationgroup_p.h b/src/corelib/animation/qanimationgroup_p.h
index ff759d11fd..215734b656 100644
--- a/src/corelib/animation/qanimationgroup_p.h
+++ b/src/corelib/animation/qanimationgroup_p.h
@@ -76,7 +76,7 @@ public:
void disconnectUncontrolledAnimation(QAbstractAnimation *anim)
{
//0 for the signal here because we might be called from the animation destructor
- QObject::disconnect(anim, 0, q_func(), SLOT(_q_uncontrolledAnimationFinished()));
+ QObject::disconnect(anim, nullptr, q_func(), SLOT(_q_uncontrolledAnimationFinished()));
}
void connectUncontrolledAnimation(QAbstractAnimation *anim)
diff --git a/src/corelib/animation/qpropertyanimation_p.h b/src/corelib/animation/qpropertyanimation_p.h
index 479762f573..cbd3ce287d 100644
--- a/src/corelib/animation/qpropertyanimation_p.h
+++ b/src/corelib/animation/qpropertyanimation_p.h
@@ -64,7 +64,7 @@ class QPropertyAnimationPrivate : public QVariantAnimationPrivate
Q_DECLARE_PUBLIC(QPropertyAnimation)
public:
QPropertyAnimationPrivate()
- : targetValue(0), propertyType(0), propertyIndex(-1)
+ : targetValue(nullptr), propertyType(0), propertyIndex(-1)
{
}
diff --git a/src/corelib/animation/qsequentialanimationgroup_p.h b/src/corelib/animation/qsequentialanimationgroup_p.h
index 88dac4f566..c082d6b524 100644
--- a/src/corelib/animation/qsequentialanimationgroup_p.h
+++ b/src/corelib/animation/qsequentialanimationgroup_p.h
@@ -63,7 +63,7 @@ class QSequentialAnimationGroupPrivate : public QAnimationGroupPrivate
Q_DECLARE_PUBLIC(QSequentialAnimationGroup)
public:
QSequentialAnimationGroupPrivate()
- : currentAnimation(0), currentAnimationIndex(-1), lastLoop(0)
+ : currentAnimation(nullptr), currentAnimationIndex(-1), lastLoop(0)
{ }
diff --git a/src/corelib/codecs/qtextcodec_p.h b/src/corelib/codecs/qtextcodec_p.h
index 0e449d994c..7fcf6df984 100644
--- a/src/corelib/codecs/qtextcodec_p.h
+++ b/src/corelib/codecs/qtextcodec_p.h
@@ -98,7 +98,7 @@ public:
struct ConverterState {
ConverterState(ConversionFlags f = DefaultConversion)
- : flags(f), remainingChars(0), invalidChars(0), d(0) { state_data[0] = state_data[1] = state_data[2] = 0; }
+ : flags(f), remainingChars(0), invalidChars(0), d(nullptr) { state_data[0] = state_data[1] = state_data[2] = 0; }
~ConverterState() { }
ConversionFlags flags;
int remainingChars;
diff --git a/src/corelib/global/qglobalstatic.h b/src/corelib/global/qglobalstatic.h
index 555bdf04c1..93d71cee57 100644
--- a/src/corelib/global/qglobalstatic.h
+++ b/src/corelib/global/qglobalstatic.h
@@ -131,8 +131,8 @@ struct QGlobalStatic
bool isDestroyed() const { return guard.load() <= QtGlobalStatic::Destroyed; }
bool exists() const { return guard.load() == QtGlobalStatic::Initialized; }
- operator Type *() { if (isDestroyed()) return 0; return innerFunction(); }
- Type *operator()() { if (isDestroyed()) return 0; return innerFunction(); }
+ operator Type *() { if (isDestroyed()) return nullptr; return innerFunction(); }
+ Type *operator()() { if (isDestroyed()) return nullptr; return innerFunction(); }
Type *operator->()
{
Q_ASSERT_X(!isDestroyed(), "Q_GLOBAL_STATIC", "The global static was used after being destroyed");
diff --git a/src/corelib/io/qabstractfileengine_p.h b/src/corelib/io/qabstractfileengine_p.h
index 4a7fe7bff5..c88b66c7ce 100644
--- a/src/corelib/io/qabstractfileengine_p.h
+++ b/src/corelib/io/qabstractfileengine_p.h
@@ -193,7 +193,7 @@ public:
uchar *address;
};
- virtual bool extension(Extension extension, const ExtensionOption *option = 0, ExtensionReturn *output = 0);
+ virtual bool extension(Extension extension, const ExtensionOption *option = nullptr, ExtensionReturn *output = nullptr);
virtual bool supportsExtension(Extension extension) const;
// Factory
diff --git a/src/corelib/io/qfileinfo_p.h b/src/corelib/io/qfileinfo_p.h
index e4b28f4519..36f440812f 100644
--- a/src/corelib/io/qfileinfo_p.h
+++ b/src/corelib/io/qfileinfo_p.h
@@ -80,7 +80,7 @@ public:
};
inline QFileInfoPrivate()
- : QSharedData(), fileEngine(0),
+ : QSharedData(), fileEngine(nullptr),
cachedFlags(0),
isDefaultConstructed(true),
cache_enabled(true), fileFlags(0), fileSize(0)
diff --git a/src/corelib/io/qfilesystemengine_p.h b/src/corelib/io/qfilesystemengine_p.h
index 09ec2d6a10..e44837747c 100644
--- a/src/corelib/io/qfilesystemengine_p.h
+++ b/src/corelib/io/qfilesystemengine_p.h
@@ -130,7 +130,7 @@ public:
static bool removeFile(const QFileSystemEntry &entry, QSystemError &error);
static bool setPermissions(const QFileSystemEntry &entry, QFile::Permissions permissions, QSystemError &error,
- QFileSystemMetaData *data = 0);
+ QFileSystemMetaData *data = nullptr);
// unused, therefore not implemented
static bool setFileTime(const QFileSystemEntry &entry, const QDateTime &newDate,
diff --git a/src/corelib/io/qfilesystemmetadata_p.h b/src/corelib/io/qfilesystemmetadata_p.h
index 4d2a5acb9b..81f4b3ba13 100644
--- a/src/corelib/io/qfilesystemmetadata_p.h
+++ b/src/corelib/io/qfilesystemmetadata_p.h
@@ -76,7 +76,7 @@ class Q_AUTOTEST_EXPORT QFileSystemMetaData
{
public:
QFileSystemMetaData()
- : knownFlagsMask(0),
+ : knownFlagsMask(nullptr),
size_(-1)
{
}
@@ -184,7 +184,7 @@ public:
void clear()
{
- knownFlagsMask = 0;
+ knownFlagsMask = nullptr;
}
void clearFlags(MetaDataFlags flags = AllMetaDataFlags)
diff --git a/src/corelib/io/qfsfileengine_p.h b/src/corelib/io/qfsfileengine_p.h
index 6b091a8eef..0f416f4886 100644
--- a/src/corelib/io/qfsfileengine_p.h
+++ b/src/corelib/io/qfsfileengine_p.h
@@ -115,7 +115,7 @@ public:
virtual bool isUnnamedFile() const
{ return false; }
- bool extension(Extension extension, const ExtensionOption *option = 0, ExtensionReturn *output = 0) override;
+ bool extension(Extension extension, const ExtensionOption *option = nullptr, ExtensionReturn *output = nullptr) override;
bool supportsExtension(Extension extension) const override;
//FS only!!
diff --git a/src/corelib/io/qprocess_p.h b/src/corelib/io/qprocess_p.h
index aa7ecbe91d..1bc63240fe 100644
--- a/src/corelib/io/qprocess_p.h
+++ b/src/corelib/io/qprocess_p.h
@@ -247,7 +247,7 @@ public:
// if you add "= 4" here, increase the number of bits below
};
- Channel() : process(0), notifier(0), type(Normal), closed(false), append(false)
+ Channel() : process(nullptr), notifier(nullptr), type(Normal), closed(false), append(false)
{
pipe[0] = INVALID_Q_PIPE;
pipe[1] = INVALID_Q_PIPE;
diff --git a/src/corelib/io/qresource_p.h b/src/corelib/io/qresource_p.h
index 7451de8809..fedf95bb33 100644
--- a/src/corelib/io/qresource_p.h
+++ b/src/corelib/io/qresource_p.h
@@ -108,7 +108,7 @@ public:
Iterator *beginEntryList(QDir::Filters filters, const QStringList &filterNames) override;
Iterator *endEntryList() override;
- bool extension(Extension extension, const ExtensionOption *option = 0, ExtensionReturn *output = 0) override;
+ bool extension(Extension extension, const ExtensionOption *option = nullptr, ExtensionReturn *output = nullptr) override;
bool supportsExtension(Extension extension) const override;
};
diff --git a/src/corelib/io/qurl_p.h b/src/corelib/io/qurl_p.h
index 1b9237e58a..e75de32e03 100644
--- a/src/corelib/io/qurl_p.h
+++ b/src/corelib/io/qurl_p.h
@@ -59,7 +59,7 @@ QT_BEGIN_NAMESPACE
// in qurlrecode.cpp
extern Q_AUTOTEST_EXPORT int qt_urlRecode(QString &appendTo, const QChar *begin, const QChar *end,
- QUrl::ComponentFormattingOptions encoding, const ushort *tableModifications = 0);
+ QUrl::ComponentFormattingOptions encoding, const ushort *tableModifications = nullptr);
// in qurlidna.cpp
enum AceLeadingDot { AllowLeadingDot, ForbidLeadingDot };
diff --git a/src/corelib/itemmodels/qabstractitemmodel_p.h b/src/corelib/itemmodels/qabstractitemmodel_p.h
index e6085eca94..92a440a125 100644
--- a/src/corelib/itemmodels/qabstractitemmodel_p.h
+++ b/src/corelib/itemmodels/qabstractitemmodel_p.h
@@ -98,7 +98,7 @@ public:
void itemsMoved(const QModelIndex &srcParent, int srcFirst, int srcLast, const QModelIndex &destinationParent, int destinationChild, Qt::Orientation orientation);
bool allowMove(const QModelIndex &srcParent, int srcFirst, int srcLast, const QModelIndex &destinationParent, int destinationChild, Qt::Orientation orientation);
- inline QModelIndex createIndex(int row, int column, void *data = 0) const {
+ inline QModelIndex createIndex(int row, int column, void *data = nullptr) const {
return q_func()->createIndex(row, column, data);
}
diff --git a/src/corelib/itemmodels/qabstractproxymodel_p.h b/src/corelib/itemmodels/qabstractproxymodel_p.h
index f7bd5cc691..a95687c970 100644
--- a/src/corelib/itemmodels/qabstractproxymodel_p.h
+++ b/src/corelib/itemmodels/qabstractproxymodel_p.h
@@ -62,7 +62,7 @@ class Q_CORE_EXPORT QAbstractProxyModelPrivate : public QAbstractItemModelPrivat
{
Q_DECLARE_PUBLIC(QAbstractProxyModel)
public:
- QAbstractProxyModelPrivate() : QAbstractItemModelPrivate(), model(0) {}
+ QAbstractProxyModelPrivate() : QAbstractItemModelPrivate(), model(nullptr) {}
QAbstractItemModel *model;
virtual void _q_sourceModelDestroyed();
void mapDropCoordinatesToSource(int row, int column, const QModelIndex &parent,
diff --git a/src/corelib/itemmodels/qitemselectionmodel_p.h b/src/corelib/itemmodels/qitemselectionmodel_p.h
index e12a0c2928..ba85f22be3 100644
--- a/src/corelib/itemmodels/qitemselectionmodel_p.h
+++ b/src/corelib/itemmodels/qitemselectionmodel_p.h
@@ -62,7 +62,7 @@ class QItemSelectionModelPrivate: public QObjectPrivate
Q_DECLARE_PUBLIC(QItemSelectionModel)
public:
QItemSelectionModelPrivate()
- : model(0),
+ : model(nullptr),
currentCommand(QItemSelectionModel::NoUpdate),
tableSelected(false), tableColCount(0), tableRowCount(0) {}
diff --git a/src/corelib/kernel/qcore_unix_p.h b/src/corelib/kernel/qcore_unix_p.h
index 5a2a29a327..32ef6408c2 100644
--- a/src/corelib/kernel/qcore_unix_p.h
+++ b/src/corelib/kernel/qcore_unix_p.h
@@ -171,7 +171,7 @@ inline void qt_ignore_sigpipe()
struct sigaction noaction;
memset(&noaction, 0, sizeof(noaction));
noaction.sa_handler = SIG_IGN;
- ::sigaction(SIGPIPE, &noaction, 0);
+ ::sigaction(SIGPIPE, &noaction, nullptr);
atom.store(1);
}
}
diff --git a/src/corelib/kernel/qcoreapplication_p.h b/src/corelib/kernel/qcoreapplication_p.h
index b3479414ab..14ca3efd7f 100644
--- a/src/corelib/kernel/qcoreapplication_p.h
+++ b/src/corelib/kernel/qcoreapplication_p.h
@@ -149,7 +149,7 @@ public:
QString cachedApplicationDirPath;
static QString *cachedApplicationFilePath;
static void setApplicationFilePath(const QString &path);
- static inline void clearApplicationFilePath() { delete cachedApplicationFilePath; cachedApplicationFilePath = 0; }
+ static inline void clearApplicationFilePath() { delete cachedApplicationFilePath; cachedApplicationFilePath = nullptr; }
#ifndef QT_NO_QOBJECT
void execCleanup();
diff --git a/src/corelib/kernel/qeventdispatcher_glib_p.h b/src/corelib/kernel/qeventdispatcher_glib_p.h
index 88ff316ee5..313825d0a7 100644
--- a/src/corelib/kernel/qeventdispatcher_glib_p.h
+++ b/src/corelib/kernel/qeventdispatcher_glib_p.h
@@ -66,8 +66,8 @@ class Q_CORE_EXPORT QEventDispatcherGlib : public QAbstractEventDispatcher
Q_DECLARE_PRIVATE(QEventDispatcherGlib)
public:
- explicit QEventDispatcherGlib(QObject *parent = 0);
- explicit QEventDispatcherGlib(GMainContext *context, QObject *parent = 0);
+ explicit QEventDispatcherGlib(QObject *parent = nullptr);
+ explicit QEventDispatcherGlib(GMainContext *context, QObject *parent = nullptr);
~QEventDispatcherGlib();
bool processEvents(QEventLoop::ProcessEventsFlags flags) override;
@@ -102,7 +102,7 @@ class Q_CORE_EXPORT QEventDispatcherGlibPrivate : public QAbstractEventDispatche
{
public:
- QEventDispatcherGlibPrivate(GMainContext *context = 0);
+ QEventDispatcherGlibPrivate(GMainContext *context = nullptr);
GMainContext *mainContext;
GPostEventSource *postEventSource;
GSocketNotifierSource *socketNotifierSource;
diff --git a/src/corelib/kernel/qeventdispatcher_unix_p.h b/src/corelib/kernel/qeventdispatcher_unix_p.h
index 0fd068b074..8cfa4bbdf7 100644
--- a/src/corelib/kernel/qeventdispatcher_unix_p.h
+++ b/src/corelib/kernel/qeventdispatcher_unix_p.h
@@ -102,7 +102,7 @@ class Q_CORE_EXPORT QEventDispatcherUNIX : public QAbstractEventDispatcher
Q_DECLARE_PRIVATE(QEventDispatcherUNIX)
public:
- explicit QEventDispatcherUNIX(QObject *parent = 0);
+ explicit QEventDispatcherUNIX(QObject *parent = nullptr);
~QEventDispatcherUNIX();
bool processEvents(QEventLoop::ProcessEventsFlags flags) override;
@@ -123,7 +123,7 @@ public:
void flush() override;
protected:
- QEventDispatcherUNIX(QEventDispatcherUNIXPrivate &dd, QObject *parent = 0);
+ QEventDispatcherUNIX(QEventDispatcherUNIXPrivate &dd, QObject *parent = nullptr);
};
class Q_CORE_EXPORT QEventDispatcherUNIXPrivate : public QAbstractEventDispatcherPrivate
@@ -152,9 +152,9 @@ public:
inline QSocketNotifierSetUNIX::QSocketNotifierSetUNIX() Q_DECL_NOTHROW
{
- notifiers[0] = 0;
- notifiers[1] = 0;
- notifiers[2] = 0;
+ notifiers[0] = nullptr;
+ notifiers[1] = nullptr;
+ notifiers[2] = nullptr;
}
inline bool QSocketNotifierSetUNIX::isEmpty() const Q_DECL_NOTHROW
diff --git a/src/corelib/kernel/qmetaobject_moc_p.h b/src/corelib/kernel/qmetaobject_moc_p.h
index ad258acfcd..8c7900767b 100644
--- a/src/corelib/kernel/qmetaobject_moc_p.h
+++ b/src/corelib/kernel/qmetaobject_moc_p.h
@@ -138,7 +138,7 @@ static QByteArray normalizeTypeInternal(const char *t, const char *e, bool fixSc
{ "struct ", 7 },
{ "class ", 6 },
{ "enum ", 5 },
- { 0, 0 }
+ { nullptr, 0 }
};
int i = 0;
do {
@@ -146,7 +146,7 @@ static QByteArray normalizeTypeInternal(const char *t, const char *e, bool fixSc
t += optional[i].len;
break;
}
- } while (optional[++i].keyword != 0);
+ } while (optional[++i].keyword != nullptr);
}
bool star = false;
diff --git a/src/corelib/kernel/qmetaobject_p.h b/src/corelib/kernel/qmetaobject_p.h
index 5b412b5140..26d86fdf14 100644
--- a/src/corelib/kernel/qmetaobject_p.h
+++ b/src/corelib/kernel/qmetaobject_p.h
@@ -226,8 +226,8 @@ struct QMetaObjectPrivate
static QObjectPrivate::Connection *connect(const QObject *sender, int signal_index,
const QMetaObject *smeta,
const QObject *receiver, int method_index_relative,
- const QMetaObject *rmeta = 0,
- int type = 0, int *types = 0);
+ const QMetaObject *rmeta = nullptr,
+ int type = 0, int *types = nullptr);
static bool disconnect(const QObject *sender, int signal_index,
const QMetaObject *smeta,
const QObject *receiver, int method_index, void **slot,
diff --git a/src/corelib/kernel/qmetaobjectbuilder_p.h b/src/corelib/kernel/qmetaobjectbuilder_p.h
index 6100835bad..6d43be7811 100644
--- a/src/corelib/kernel/qmetaobjectbuilder_p.h
+++ b/src/corelib/kernel/qmetaobjectbuilder_p.h
@@ -173,7 +173,7 @@ public:
void setStaticMetacallFunction(QMetaObjectBuilder::StaticMetacallFunction value);
QMetaObject *toMetaObject() const;
- QByteArray toRelocatableData(bool * = 0) const;
+ QByteArray toRelocatableData(bool * = nullptr) const;
static void fromRelocatableData(QMetaObject *, const QMetaObject *, const QByteArray &);
#ifndef QT_NO_DATASTREAM
@@ -196,7 +196,7 @@ private:
class Q_CORE_EXPORT QMetaMethodBuilder
{
public:
- QMetaMethodBuilder() : _mobj(0), _index(0) {}
+ QMetaMethodBuilder() : _mobj(nullptr), _index(0) {}
int index() const;
@@ -238,7 +238,7 @@ private:
class Q_CORE_EXPORT QMetaPropertyBuilder
{
public:
- QMetaPropertyBuilder() : _mobj(0), _index(0) {}
+ QMetaPropertyBuilder() : _mobj(nullptr), _index(0) {}
int index() const { return _index; }
@@ -294,7 +294,7 @@ private:
class Q_CORE_EXPORT QMetaEnumBuilder
{
public:
- QMetaEnumBuilder() : _mobj(0), _index(0) {}
+ QMetaEnumBuilder() : _mobj(nullptr), _index(0) {}
int index() const { return _index; }
diff --git a/src/corelib/kernel/qsharedmemory_p.h b/src/corelib/kernel/qsharedmemory_p.h
index 95fe0d1083..59802eb6ce 100644
--- a/src/corelib/kernel/qsharedmemory_p.h
+++ b/src/corelib/kernel/qsharedmemory_p.h
@@ -98,7 +98,7 @@ public:
{
if (q_sm && q_sm->lock())
return true;
- q_sm = 0;
+ q_sm = nullptr;
return false;
}
diff --git a/src/corelib/kernel/qvariant_p.h b/src/corelib/kernel/qvariant_p.h
index b22b7c231e..3d87beac83 100644
--- a/src/corelib/kernel/qvariant_p.h
+++ b/src/corelib/kernel/qvariant_p.h
@@ -88,7 +88,7 @@ inline T *v_cast(const QVariant::Private *nd, T * = 0)
#else // every other compiler in this world
template <typename T>
-inline const T *v_cast(const QVariant::Private *d, T * = 0)
+inline const T *v_cast(const QVariant::Private *d, T * = nullptr)
{
return !QVariantIntegrator<T>::CanUseInternalSpace
? static_cast<const T *>(d->data.shared->ptr)
@@ -96,7 +96,7 @@ inline const T *v_cast(const QVariant::Private *d, T * = 0)
}
template <typename T>
-inline T *v_cast(QVariant::Private *d, T * = 0)
+inline T *v_cast(QVariant::Private *d, T * = nullptr)
{
return !QVariantIntegrator<T>::CanUseInternalSpace
? static_cast<T *>(d->data.shared->ptr)
@@ -154,7 +154,7 @@ inline void v_construct(QVariant::Private *x, const T &t)
// constructs a new variant if copy is 0, otherwise copy-constructs
template <class T>
-inline void v_construct(QVariant::Private *x, const void *copy, T * = 0)
+inline void v_construct(QVariant::Private *x, const void *copy, T * = nullptr)
{
if (copy)
v_construct<T>(x, *static_cast<const T *>(copy));
@@ -164,7 +164,7 @@ inline void v_construct(QVariant::Private *x, const void *copy, T * = 0)
// deletes the internal structures
template <class T>
-inline void v_clear(QVariant::Private *d, T* = 0)
+inline void v_clear(QVariant::Private *d, T* = nullptr)
{
if (!QVariantIntegrator<T>::CanUseInternalSpace) {
@@ -264,7 +264,7 @@ class QVariantIsNull
struct No { char unused[2]; };
Q_STATIC_ASSERT(sizeof(Yes) != sizeof(No));
- template<class C> static decltype(static_cast<const C*>(0)->isNull(), Yes()) test(int);
+ template<class C> static decltype(static_cast<const C*>(nullptr)->isNull(), Yes()) test(int);
template<class C> static No test(...);
public:
static const bool Value = (sizeof(test<T>(0)) == sizeof(Yes));
diff --git a/src/corelib/plugin/qlibrary_p.h b/src/corelib/plugin/qlibrary_p.h
index 3f650501c8..1a216c98b5 100644
--- a/src/corelib/plugin/qlibrary_p.h
+++ b/src/corelib/plugin/qlibrary_p.h
@@ -96,7 +96,7 @@ public:
void setLoadHints(QLibrary::LoadHints lh);
static QLibraryPrivate *findOrCreate(const QString &fileName, const QString &version = QString(),
- QLibrary::LoadHints loadHints = 0);
+ QLibrary::LoadHints loadHints = nullptr);
static QStringList suffixes_sys(const QString &fullVersion);
static QStringList prefixes_sys();
diff --git a/src/corelib/serialization/qjson_p.h b/src/corelib/serialization/qjson_p.h
index 40b2414e4a..a9e7059cbe 100644
--- a/src/corelib/serialization/qjson_p.h
+++ b/src/corelib/serialization/qjson_p.h
@@ -686,7 +686,7 @@ public:
{
}
inline Data(int reserved, QJsonValue::Type valueType)
- : rawData(0), compactionCounter(0), ownsData(true)
+ : rawData(nullptr), compactionCounter(0), ownsData(true)
{
Q_ASSERT(valueType == QJsonValue::Array || valueType == QJsonValue::Object);
@@ -728,7 +728,7 @@ public:
size = qMax(size + reserve, qMin(size *2, (int)Value::MaxSize));
if (size > Value::MaxSize) {
qWarning("QJson: Document too large to store in data structure");
- return 0;
+ return nullptr;
}
}
char *raw = (char *)malloc(size);
diff --git a/src/corelib/serialization/qxmlstream_p.h b/src/corelib/serialization/qxmlstream_p.h
index 61f501f81b..cde66a48a3 100644
--- a/src/corelib/serialization/qxmlstream_p.h
+++ b/src/corelib/serialization/qxmlstream_p.h
@@ -162,12 +162,12 @@ public:
const char *const QXmlStreamReader_Table::spell [] = {
- "end of file", 0, " ", "<", ">", "&", "#", "\'", "\"", "[",
+ "end of file", nullptr, " ", "<", ">", "&", "#", "\'", "\"", "[",
"]", "(", ")", "|", "=", "%", "/", ":", ";", ",",
"-", "+", "*", ".", "?", "!", "[a-zA-Z]", "[0-9]", "[CDATA[", "DOCTYPE",
"ELEMENT", "ATTLIST", "ENTITY", "NOTATION", "SYSTEM", "PUBLIC", "NDATA", "REQUIRED", "IMPLIED", "FIXED",
- "EMPTY", "ANY", "PCDATA", 0, 0, 0, 0, "CDATA", "ID", "IDREF",
- "IDREFS", "ENTITIES", "NMTOKEN", "NMTOKENS", "<?xml", "version", 0};
+ "EMPTY", "ANY", "PCDATA", nullptr, nullptr, nullptr, nullptr, "CDATA", "ID", "IDREF",
+ "IDREFS", "ENTITIES", "NMTOKEN", "NMTOKENS", "<?xml", "version", nullptr};
const short QXmlStreamReader_Table::lhs [] = {
57, 57, 59, 59, 59, 59, 59, 59, 59, 59,
@@ -645,7 +645,7 @@ template <typename T> class QXmlStreamSimpleStack {
T *data;
int tos, cap;
public:
- inline QXmlStreamSimpleStack():data(0), tos(-1), cap(0){}
+ inline QXmlStreamSimpleStack():data(nullptr), tos(-1), cap(0){}
inline ~QXmlStreamSimpleStack(){ if (data) free(data); }
inline void reserve(int extraCapacity) {
@@ -995,7 +995,7 @@ public:
int fastScanLiteralContent();
int fastScanSpace();
int fastScanContentCharList();
- int fastScanName(int *prefix = 0);
+ int fastScanName(int *prefix = nullptr);
inline int fastScanNMTOKEN();
diff --git a/src/corelib/statemachine/qstate_p.h b/src/corelib/statemachine/qstate_p.h
index 7fb40392e7..ec746caae1 100644
--- a/src/corelib/statemachine/qstate_p.h
+++ b/src/corelib/statemachine/qstate_p.h
@@ -68,14 +68,14 @@ QT_BEGIN_NAMESPACE
struct QPropertyAssignment
{
QPropertyAssignment()
- : object(0), explicitlySet(true) {}
+ : object(nullptr), explicitlySet(true) {}
QPropertyAssignment(QObject *o, const QByteArray &n,
const QVariant &v, bool es = true)
: object(o), propertyName(n), value(v), explicitlySet(es)
{}
bool objectDeleted() const { return !object; }
- void write() const { Q_ASSERT(object != 0); object->setProperty(propertyName, value); }
+ void write() const { Q_ASSERT(object != nullptr); object->setProperty(propertyName, value); }
bool hasTarget(QObject *o, const QByteArray &pn) const
{ return object == o && propertyName == pn; }
@@ -99,8 +99,8 @@ public:
QStatePrivate();
~QStatePrivate();
- static QStatePrivate *get(QState *q) { return q ? q->d_func() : 0; }
- static const QStatePrivate *get(const QState *q) { return q? q->d_func() : 0; }
+ static QStatePrivate *get(QState *q) { return q ? q->d_func() : nullptr; }
+ static const QStatePrivate *get(const QState *q) { return q? q->d_func() : nullptr; }
QList<QAbstractState*> childStates() const;
QList<QHistoryState*> historyStates() const;
diff --git a/src/corelib/statemachine/qstatemachine_p.h b/src/corelib/statemachine/qstatemachine_p.h
index f3366ca5f7..c66130b8ce 100644
--- a/src/corelib/statemachine/qstatemachine_p.h
+++ b/src/corelib/statemachine/qstatemachine_p.h
@@ -108,7 +108,7 @@ public:
~QStateMachinePrivate();
static QStateMachinePrivate *get(QStateMachine *q)
- { return q ? q->d_func() : 0; }
+ { return q ? q->d_func() : nullptr; }
QState *findLCA(const QList<QAbstractState*> &states, bool onlyCompound = false) const;
QState *findLCCA(const QList<QAbstractState*> &states) const;
@@ -313,7 +313,7 @@ public:
DelayedEvent(QEvent *e, int tid)
: event(e), timerId(tid) {}
DelayedEvent()
- : event(0), timerId(0) {}
+ : event(nullptr), timerId(0) {}
};
QHash<int, DelayedEvent> delayedEvents;
QHash<int, int> timerIdToDelayedEventId;
diff --git a/src/corelib/thread/qatomic_bootstrap.h b/src/corelib/thread/qatomic_bootstrap.h
index b463f817bd..27a67fb2ee 100644
--- a/src/corelib/thread/qatomic_bootstrap.h
+++ b/src/corelib/thread/qatomic_bootstrap.h
@@ -65,7 +65,7 @@ template <typename T> struct QAtomicOps: QGenericAtomicOps<QAtomicOps<T> >
return --_q_value != 0;
}
- static bool testAndSetRelaxed(T &_q_value, T expectedValue, T newValue, T *currentValue = 0) Q_DECL_NOTHROW
+ static bool testAndSetRelaxed(T &_q_value, T expectedValue, T newValue, T *currentValue = nullptr) Q_DECL_NOTHROW
{
if (currentValue)
*currentValue = _q_value;
diff --git a/src/corelib/thread/qresultstore.h b/src/corelib/thread/qresultstore.h
index 1f29e8d187..7a65089396 100644
--- a/src/corelib/thread/qresultstore.h
+++ b/src/corelib/thread/qresultstore.h
@@ -142,7 +142,7 @@ public:
template <typename T>
int addResult(int index, const T *result)
{
- if (result == 0)
+ if (result == nullptr)
return addResult(index, static_cast<void *>(nullptr));
else
return addResult(index, static_cast<void *>(new T(*result)));
@@ -158,7 +158,7 @@ public:
int addResults(int index, const QVector<T> *results, int totalCount)
{
if (m_filterMode == true && results->count() != totalCount && 0 == results->count())
- return addResults(index, 0, 0, totalCount);
+ return addResults(index, nullptr, 0, totalCount);
else
return addResults(index, new QVector<T>(*results), results->count(), totalCount);
}
diff --git a/src/corelib/thread/qthread_p.h b/src/corelib/thread/qthread_p.h
index 7d9442ab79..e614ddd004 100644
--- a/src/corelib/thread/qthread_p.h
+++ b/src/corelib/thread/qthread_p.h
@@ -89,7 +89,7 @@ public:
QEvent *event;
int priority;
inline QPostEvent()
- : receiver(0), event(0), priority(0)
+ : receiver(nullptr), event(nullptr), priority(0)
{ }
inline QPostEvent(QObject *r, QEvent *e, int p)
: receiver(r), event(e), priority(p)
@@ -148,7 +148,7 @@ private:
class Q_CORE_EXPORT QDaemonThread : public QThread
{
public:
- QDaemonThread(QObject *parent = 0);
+ QDaemonThread(QObject *parent = nullptr);
~QDaemonThread();
};
@@ -157,7 +157,7 @@ class QThreadPrivate : public QObjectPrivate
Q_DECLARE_PUBLIC(QThread)
public:
- QThreadPrivate(QThreadData *d = 0);
+ QThreadPrivate(QThreadData *d = nullptr);
~QThreadPrivate();
void setPriority(QThread::Priority prio);
@@ -248,7 +248,7 @@ public:
#endif
static void clearCurrentThreadData();
static QThreadData *get2(QThread *thread)
- { Q_ASSERT_X(thread != 0, "QThread", "internal error"); return thread->d_func()->data; }
+ { Q_ASSERT_X(thread != nullptr, "QThread", "internal error"); return thread->d_func()->data; }
void ref();
@@ -281,7 +281,7 @@ public:
public:
FlaggedDebugSignatures() : idx(0)
- { std::fill_n(locations, Count, static_cast<char*>(0)); }
+ { std::fill_n(locations, Count, static_cast<char*>(nullptr)); }
void store(const char* method)
{ locations[idx++ % Count] = method; }
@@ -328,7 +328,7 @@ class QAdoptedThread : public QThread
Q_DECLARE_PRIVATE(QThread)
public:
- QAdoptedThread(QThreadData *data = 0);
+ QAdoptedThread(QThreadData *data = nullptr);
~QAdoptedThread();
void init();
diff --git a/src/corelib/thread/qthreadpool_p.h b/src/corelib/thread/qthreadpool_p.h
index 952e02ef20..01852d8366 100644
--- a/src/corelib/thread/qthreadpool_p.h
+++ b/src/corelib/thread/qthreadpool_p.h
@@ -162,7 +162,7 @@ public:
void tryToStartMoreThreads();
bool tooManyThreadsActive() const;
- void startThread(QRunnable *runnable = 0);
+ void startThread(QRunnable *runnable = nullptr);
void reset();
bool waitForDone(int msecs);
bool waitForDone(const QDeadlineTimer &timer);
diff --git a/src/corelib/thread/qthreadstorage.h b/src/corelib/thread/qthreadstorage.h
index 55fc482da3..9eb8672e92 100644
--- a/src/corelib/thread/qthreadstorage.h
+++ b/src/corelib/thread/qthreadstorage.h
@@ -69,7 +69,7 @@ inline
T *&qThreadStorage_localData(QThreadStorageData &d, T **)
{
void **v = d.get();
- if (!v) v = d.set(0);
+ if (!v) v = d.set(nullptr);
return *(reinterpret_cast<T**>(v));
}
@@ -139,7 +139,7 @@ public:
inline ~QThreadStorage() { }
inline bool hasLocalData() const
- { return d.get() != 0; }
+ { return d.get() != nullptr; }
inline T& localData()
{ return qThreadStorage_localData(d, reinterpret_cast<T*>(0)); }
diff --git a/src/corelib/tools/qcache.h b/src/corelib/tools/qcache.h
index 8c0e7860f7..b558a8358d 100644
--- a/src/corelib/tools/qcache.h
+++ b/src/corelib/tools/qcache.h
@@ -51,7 +51,7 @@ class QCache
struct Node {
inline Node() : keyPtr(0) {}
inline Node(T *data, int cost)
- : keyPtr(0), t(data), c(cost), p(0), n(0) {}
+ : keyPtr(nullptr), t(data), c(cost), p(nullptr), n(nullptr) {}
const Key *keyPtr; T *t; int c; Node *p,*n;
};
Node *f, *l;
@@ -71,14 +71,14 @@ class QCache
inline T *relink(const Key &key) {
typename QHash<Key, Node>::iterator i = hash.find(key);
if (typename QHash<Key, Node>::const_iterator(i) == hash.constEnd())
- return 0;
+ return nullptr;
Node &n = *i;
if (f != &n) {
if (n.p) n.p->n = n.n;
if (n.n) n.n->p = n.p;
if (l == &n) l = n.p;
- n.p = 0;
+ n.p = nullptr;
n.n = f;
f->p = &n;
f = &n;
@@ -117,12 +117,12 @@ private:
template <class Key, class T>
inline QCache<Key, T>::QCache(int amaxCost) Q_DECL_NOTHROW
- : f(0), l(0), mx(amaxCost), total(0) {}
+ : f(nullptr), l(nullptr), mx(amaxCost), total(0) {}
template <class Key, class T>
inline void QCache<Key,T>::clear()
{ while (f) { delete f->t; f = f->n; }
- hash.clear(); l = 0; total = 0; }
+ hash.clear(); l = nullptr; total = 0; }
template <class Key, class T>
inline void QCache<Key,T>::setMaxCost(int m)
@@ -153,11 +153,11 @@ inline T *QCache<Key,T>::take(const Key &key)
{
typename QHash<Key, Node>::iterator i = hash.find(key);
if (i == hash.end())
- return 0;
+ return nullptr;
Node &n = *i;
T *t = n.t;
- n.t = 0;
+ n.t = nullptr;
unlink(n);
return t;
}
diff --git a/src/corelib/tools/qdatetime_p.h b/src/corelib/tools/qdatetime_p.h
index 4d30d4192b..6e4120d762 100644
--- a/src/corelib/tools/qdatetime_p.h
+++ b/src/corelib/tools/qdatetime_p.h
@@ -135,7 +135,7 @@ public:
#if QT_CONFIG(timezone)
static qint64 zoneMSecsToEpochMSecs(qint64 msecs, const QTimeZone &zone,
DaylightStatus hint = UnknownDaylightTime,
- QDate *localDate = 0, QTime *localTime = 0);
+ QDate *localDate = nullptr, QTime *localTime = nullptr);
// Inlined for its one caller in qdatetime.cpp
inline void setUtcOffsetByTZ(qint64 atMSecsSinceEpoch);
diff --git a/src/corelib/tools/qdatetimeparser_p.h b/src/corelib/tools/qdatetimeparser_p.h
index f7e6e351fe..e244fed09a 100644
--- a/src/corelib/tools/qdatetimeparser_p.h
+++ b/src/corelib/tools/qdatetimeparser_p.h
@@ -86,7 +86,7 @@ public:
DateTimeEdit
};
QDateTimeParser(QVariant::Type t, Context ctx)
- : currentSectionIndex(-1), display(0), cachedDay(-1), parserType(t),
+ : currentSectionIndex(-1), display(nullptr), cachedDay(-1), parserType(t),
fixday(false), spec(Qt::LocalTime), context(ctx)
{
defaultLocale = QLocale::system();
@@ -218,9 +218,9 @@ private:
ParsedSection parseSection(const QDateTime &currentValue, int sectionIndex,
int offset, QString *text) const;
int findMonth(const QString &str1, int monthstart, int sectionIndex,
- QString *monthName = 0, int *used = 0) const;
+ QString *monthName = nullptr, int *used = nullptr) const;
int findDay(const QString &str1, int intDaystart, int sectionIndex,
- QString *dayName = 0, int *used = 0) const;
+ QString *dayName = nullptr, int *used = nullptr) const;
ParsedSection findTimeZone(QStringRef str, const QDateTime &when,
int maxVal, int minVal) const;
#if QT_CONFIG(timezone)
@@ -236,7 +236,7 @@ private:
PossiblePM = 3,
PossibleBoth = 4
};
- AmPmFinder findAmPm(QString &str, int index, int *used = 0) const;
+ AmPmFinder findAmPm(QString &str, int index, int *used = nullptr) const;
#endif // datestring
bool potentialValue(const QStringRef &str, int min, int max, int index,
diff --git a/src/corelib/tools/qfreelist_p.h b/src/corelib/tools/qfreelist_p.h
index 63be0952ff..d72d6e1b4b 100644
--- a/src/corelib/tools/qfreelist_p.h
+++ b/src/corelib/tools/qfreelist_p.h
@@ -249,11 +249,11 @@ inline int QFreeList<T, ConstantsType>::next()
if (!v) {
v = allocate((id & ConstantsType::IndexMask) - at, ConstantsType::Sizes[block]);
- if (!_v[block].testAndSetRelease(0, v)) {
+ if (!_v[block].testAndSetRelease(nullptr, v)) {
// race with another thread lost
delete [] v;
v = _v[block].loadAcquire();
- Q_ASSERT(v != 0);
+ Q_ASSERT(v != nullptr);
}
}
diff --git a/src/corelib/tools/qlist.h b/src/corelib/tools/qlist.h
index 6643288bd5..34577acaa5 100644
--- a/src/corelib/tools/qlist.h
+++ b/src/corelib/tools/qlist.h
@@ -526,7 +526,7 @@ inline typename QList<T>::iterator QList<T>::insert(iterator before, const T &t)
Q_ASSERT_X(isValidIterator(before), "QList::insert", "The specified iterator argument 'before' is invalid");
int iBefore = int(before.i - reinterpret_cast<Node *>(p.begin()));
- Node *n = 0;
+ Node *n = nullptr;
if (d->ref.isShared())
n = detach_helper_grow(iBefore, 1);
else
diff --git a/src/corelib/tools/qlocale_p.h b/src/corelib/tools/qlocale_p.h
index 98b6a31a46..1e8dc28fbf 100644
--- a/src/corelib/tools/qlocale_p.h
+++ b/src/corelib/tools/qlocale_p.h
@@ -249,7 +249,7 @@ public:
if (qIsInf(d))
return float(d);
if (std::fabs(d) > std::numeric_limits<float>::max()) {
- if (ok != 0)
+ if (ok != nullptr)
*ok = false;
const float huge = std::numeric_limits<float>::infinity();
return d < 0 ? -huge : huge;
diff --git a/src/dbus/qdbusargument_p.h b/src/dbus/qdbusargument_p.h
index b678b9606f..3553d3d151 100644
--- a/src/dbus/qdbusargument_p.h
+++ b/src/dbus/qdbusargument_p.h
@@ -71,7 +71,7 @@ class QDBusArgumentPrivate
{
public:
inline QDBusArgumentPrivate(int flags = 0)
- : message(0), ref(1), capabilities(flags)
+ : message(nullptr), ref(1), capabilities(flags)
{ }
virtual ~QDBusArgumentPrivate();
@@ -104,7 +104,7 @@ public:
class QDBusMarshaller: public QDBusArgumentPrivate
{
public:
- QDBusMarshaller(int flags) : QDBusArgumentPrivate(flags), parent(0), ba(0), closeCode(0), ok(true), skipSignature(false)
+ QDBusMarshaller(int flags) : QDBusArgumentPrivate(flags), parent(nullptr), ba(nullptr), closeCode(0), ok(true), skipSignature(false)
{ direction = Marshalling; }
~QDBusMarshaller();
@@ -161,7 +161,7 @@ private:
class QDBusDemarshaller: public QDBusArgumentPrivate
{
public:
- inline QDBusDemarshaller(int flags) : QDBusArgumentPrivate(flags), parent(0)
+ inline QDBusDemarshaller(int flags) : QDBusArgumentPrivate(flags), parent(nullptr)
{ direction = Demarshalling; }
~QDBusDemarshaller();
diff --git a/src/dbus/qdbusconnection_p.h b/src/dbus/qdbusconnection_p.h
index 7769b9ea71..da67a6c5d4 100644
--- a/src/dbus/qdbusconnection_p.h
+++ b/src/dbus/qdbusconnection_p.h
@@ -115,7 +115,7 @@ public:
struct Watcher
{
- Watcher(): watch(0), read(0), write(0) {}
+ Watcher(): watch(nullptr), read(nullptr), write(nullptr) {}
DBusWatch *watch;
QSocketNotifier *read;
QSocketNotifier *write;
@@ -132,7 +132,7 @@ public:
struct SignalHook
{
- inline SignalHook() : obj(0), midx(-1) { }
+ inline SignalHook() : obj(nullptr), midx(-1) { }
QString service, path, signature;
QObject* obj;
int midx;
@@ -150,9 +150,9 @@ public:
{
typedef QVector<ObjectTreeNode> DataList;
- inline ObjectTreeNode() : obj(0), flags(0) { }
+ inline ObjectTreeNode() : obj(nullptr), flags(0) { }
inline ObjectTreeNode(const QString &n) // intentionally implicit
- : name(n), obj(0), flags(0) { }
+ : name(n), obj(nullptr), flags(0) { }
inline bool operator<(const QString &other) const
{ return name < other; }
inline bool operator<(const QStringRef &other) const
@@ -194,7 +194,7 @@ public:
public:
// public methods are entry points from other objects
- explicit QDBusConnectionPrivate(QObject *parent = 0);
+ explicit QDBusConnectionPrivate(QObject *parent = nullptr);
~QDBusConnectionPrivate();
void createBusService();
diff --git a/src/dbus/qdbusintegrator_p.h b/src/dbus/qdbusintegrator_p.h
index 3cd029a933..0f7e00fde0 100644
--- a/src/dbus/qdbusintegrator_p.h
+++ b/src/dbus/qdbusintegrator_p.h
@@ -106,7 +106,7 @@ class QDBusCallDeliveryEvent: public QMetaCallEvent
public:
QDBusCallDeliveryEvent(const QDBusConnection &c, int id, QObject *sender,
const QDBusMessage &msg, const QVector<int> &types, int f = 0)
- : QMetaCallEvent(0, id, 0, sender, -1), connection(c), message(msg), metaTypes(types), flags(f)
+ : QMetaCallEvent(0, id, nullptr, sender, -1), connection(c), message(msg), metaTypes(types), flags(f)
{ }
void placeMetaCall(QObject *object) override
@@ -126,8 +126,8 @@ class QDBusActivateObjectEvent: public QMetaCallEvent
public:
QDBusActivateObjectEvent(const QDBusConnection &c, QObject *sender,
const QDBusConnectionPrivate::ObjectTreeNode &n,
- int p, const QDBusMessage &m, QSemaphore *s = 0)
- : QMetaCallEvent(0, ushort(-1), 0, sender, -1, 0, 0, 0, s), connection(c), node(n),
+ int p, const QDBusMessage &m, QSemaphore *s = nullptr)
+ : QMetaCallEvent(0, ushort(-1), nullptr, sender, -1, 0, nullptr, nullptr, s), connection(c), node(n),
pathStartPos(p), message(m), handled(false)
{ }
~QDBusActivateObjectEvent();
diff --git a/src/dbus/qdbuspendingcall_p.h b/src/dbus/qdbuspendingcall_p.h
index 10f189ae43..e1f6240f3e 100644
--- a/src/dbus/qdbuspendingcall_p.h
+++ b/src/dbus/qdbuspendingcall_p.h
@@ -99,7 +99,7 @@ public:
// }
QDBusPendingCallPrivate(const QDBusMessage &sent, QDBusConnectionPrivate *connection)
- : sentMessage(sent), connection(connection), watcherHelper(0), pending(0)
+ : sentMessage(sent), connection(connection), watcherHelper(nullptr), pending(nullptr)
{ }
~QDBusPendingCallPrivate();
bool setReplyCallback(QObject *target, const char *member);
diff --git a/src/dbus/qdbuspendingreply.h b/src/dbus/qdbuspendingreply.h
index bc5cd92c84..1d7e60ad7f 100644
--- a/src/dbus/qdbuspendingreply.h
+++ b/src/dbus/qdbuspendingreply.h
@@ -156,7 +156,7 @@ public:
{
Q_STATIC_ASSERT_X(Index >= 0 && Index < Count, "Index out of bounds");
typedef typename Select<Index>::Type ResultType;
- return qdbus_cast<ResultType>(argumentAt(Index), 0);
+ return qdbus_cast<ResultType>(argumentAt(Index), nullptr);
}
#endif
diff --git a/src/dbus/qdbusutil_p.h b/src/dbus/qdbusutil_p.h
index 2f187687b8..5a4b461194 100644
--- a/src/dbus/qdbusutil_p.h
+++ b/src/dbus/qdbusutil_p.h
@@ -134,7 +134,7 @@ namespace Q_DBUS_NO_EXPORT QDBusUtil
return false;
}
- inline bool checkMemberName(const QString &name, AllowEmptyFlag empty, QDBusError *error, const char *nameType = 0)
+ inline bool checkMemberName(const QString &name, AllowEmptyFlag empty, QDBusError *error, const char *nameType = nullptr)
{
if (!nameType) nameType = "member";
if (name.isEmpty()) {
diff --git a/src/gui/accessible/qaccessiblecache_p.h b/src/gui/accessible/qaccessiblecache_p.h
index a976277c1d..cf1ed04f35 100644
--- a/src/gui/accessible/qaccessiblecache_p.h
+++ b/src/gui/accessible/qaccessiblecache_p.h
@@ -73,7 +73,7 @@ public:
QAccessibleInterface *interfaceForId(QAccessible::Id id) const;
QAccessible::Id idForInterface(QAccessibleInterface *iface) const;
QAccessible::Id insert(QObject *object, QAccessibleInterface *iface) const;
- void deleteInterface(QAccessible::Id id, QObject *obj = 0);
+ void deleteInterface(QAccessible::Id id, QObject *obj = nullptr);
#ifdef Q_OS_MAC
QT_MANGLE_NAMESPACE(QMacAccessibilityElement) *elementForId(QAccessible::Id axid) const;
diff --git a/src/gui/image/qimage_p.h b/src/gui/image/qimage_p.h
index a599fc17c9..1e0578a0f4 100644
--- a/src/gui/image/qimage_p.h
+++ b/src/gui/image/qimage_p.h
@@ -67,7 +67,7 @@ struct Q_GUI_EXPORT QImageData { // internal image data
QImageData();
~QImageData();
static QImageData *create(const QSize &size, QImage::Format format);
- static QImageData *create(uchar *data, int w, int h, int bpl, QImage::Format format, bool readOnly, QImageCleanupFunction cleanupFunction = 0, void *cleanupInfo = 0);
+ static QImageData *create(uchar *data, int w, int h, int bpl, QImage::Format format, bool readOnly, QImageCleanupFunction cleanupFunction = nullptr, void *cleanupInfo = nullptr);
QAtomicInt ref;
diff --git a/src/gui/image/qpixmapcache_p.h b/src/gui/image/qpixmapcache_p.h
index 3c57367514..ab8e2b7558 100644
--- a/src/gui/image/qpixmapcache_p.h
+++ b/src/gui/image/qpixmapcache_p.h
@@ -87,7 +87,7 @@ public:
&& !d->image.d->paintEngine->isActive())
{
delete d->image.d->paintEngine;
- d->image.d->paintEngine = 0;
+ d->image.d->paintEngine = nullptr;
}
}
}
diff --git a/src/gui/image/qppmhandler_p.h b/src/gui/image/qppmhandler_p.h
index f3c9d0f139..2f3811b759 100644
--- a/src/gui/image/qppmhandler_p.h
+++ b/src/gui/image/qppmhandler_p.h
@@ -71,7 +71,7 @@ public:
QByteArray name() const override;
#endif
- static bool canRead(QIODevice *device, QByteArray *subType = 0);
+ static bool canRead(QIODevice *device, QByteArray *subType = nullptr);
QVariant option(ImageOption option) const override;
void setOption(ImageOption option, const QVariant &value) override;
diff --git a/src/gui/itemmodels/qstandarditemmodel_p.h b/src/gui/itemmodels/qstandarditemmodel_p.h
index 23d2938bc4..97c2e6f01b 100644
--- a/src/gui/itemmodels/qstandarditemmodel_p.h
+++ b/src/gui/itemmodels/qstandarditemmodel_p.h
@@ -109,11 +109,11 @@ class QStandardItemPrivate
Q_DECLARE_PUBLIC(QStandardItem)
public:
inline QStandardItemPrivate()
- : model(0),
- parent(0),
+ : model(nullptr),
+ parent(nullptr),
rows(0),
columns(0),
- q_ptr(0),
+ q_ptr(nullptr),
lastKnownIndex(-1)
{ }
@@ -220,10 +220,10 @@ public:
if (!index.isValid())
return root.data();
if (index.model() != q)
- return 0;
+ return nullptr;
QStandardItem *parent = static_cast<QStandardItem*>(index.internalPointer());
- if (parent == 0)
- return 0;
+ if (parent == nullptr)
+ return nullptr;
return parent->child(index.row(), index.column());
}
diff --git a/src/gui/kernel/qdnd_p.h b/src/gui/kernel/qdnd_p.h
index 8f8eb03f87..b1219c8658 100644
--- a/src/gui/kernel/qdnd_p.h
+++ b/src/gui/kernel/qdnd_p.h
@@ -73,9 +73,9 @@ class QDragPrivate : public QObjectPrivate
{
public:
QDragPrivate()
- : source(0)
- , target(0)
- , data(0)
+ : source(nullptr)
+ , target(nullptr)
+ , data(nullptr)
{ }
QObject *source;
QObject *target;
diff --git a/src/gui/kernel/qguiapplication_p.h b/src/gui/kernel/qguiapplication_p.h
index 61d9661286..65afa5de1b 100644
--- a/src/gui/kernel/qguiapplication_p.h
+++ b/src/gui/kernel/qguiapplication_p.h
@@ -115,7 +115,7 @@ public:
if (QCoreApplication::instance())
return QCoreApplication::instance()->d_func()->threadData->eventDispatcher.load();
else
- return 0;
+ return nullptr;
}
static void processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent *e);
@@ -205,7 +205,7 @@ public:
static void showModalWindow(QWindow *window);
static void hideModalWindow(QWindow *window);
static void updateBlockedStatus(QWindow *window);
- virtual bool isWindowBlocked(QWindow *window, QWindow **blockingWindow = 0) const;
+ virtual bool isWindowBlocked(QWindow *window, QWindow **blockingWindow = nullptr) const;
virtual bool popupActive() { return false; }
static ulong mousePressTime;
diff --git a/src/gui/kernel/qinputmethod_p.h b/src/gui/kernel/qinputmethod_p.h
index 0c2b739d92..5657edeb4e 100644
--- a/src/gui/kernel/qinputmethod_p.h
+++ b/src/gui/kernel/qinputmethod_p.h
@@ -67,7 +67,7 @@ class QInputMethodPrivate : public QObjectPrivate
Q_DECLARE_PUBLIC(QInputMethod)
public:
- inline QInputMethodPrivate() : testContext(0)
+ inline QInputMethodPrivate() : testContext(nullptr)
{}
QPlatformInputContext *platformInputContext() const
{
diff --git a/src/gui/kernel/qopenglcontext_p.h b/src/gui/kernel/qopenglcontext_p.h
index 2849d0c58e..c6ad893ee6 100644
--- a/src/gui/kernel/qopenglcontext_p.h
+++ b/src/gui/kernel/qopenglcontext_p.h
@@ -131,7 +131,7 @@ class Q_GUI_EXPORT QOpenGLContextGroupPrivate : public QObjectPrivate
Q_DECLARE_PUBLIC(QOpenGLContextGroup)
public:
QOpenGLContextGroupPrivate()
- : m_context(0)
+ : m_context(nullptr)
, m_mutex(QMutex::Recursive)
, m_refs(0)
{
@@ -198,20 +198,20 @@ class Q_GUI_EXPORT QOpenGLContextPrivate : public QObjectPrivate
Q_DECLARE_PUBLIC(QOpenGLContext)
public:
QOpenGLContextPrivate()
- : qGLContextHandle(0)
- , qGLContextDeleteFunction(0)
- , platformGLContext(0)
- , shareContext(0)
- , shareGroup(0)
- , screen(0)
- , surface(0)
- , functions(0)
- , textureFunctions(0)
+ : qGLContextHandle(nullptr)
+ , qGLContextDeleteFunction(nullptr)
+ , platformGLContext(nullptr)
+ , shareContext(nullptr)
+ , shareGroup(nullptr)
+ , screen(nullptr)
+ , surface(nullptr)
+ , functions(nullptr)
+ , textureFunctions(nullptr)
, max_texture_size(-1)
, workaround_brokenFBOReadBack(false)
, workaround_brokenTexSubImage(false)
, workaround_missingPrecisionQualifiers(false)
- , active_engine(0)
+ , active_engine(nullptr)
, qgl_current_fbo_invalid(false)
, qgl_current_fbo(nullptr)
, defaultFboRedirect(0)
diff --git a/src/gui/kernel/qplatformintegration.h b/src/gui/kernel/qplatformintegration.h
index de5f9c1c9a..8ece390420 100644
--- a/src/gui/kernel/qplatformintegration.h
+++ b/src/gui/kernel/qplatformintegration.h
@@ -114,7 +114,7 @@ public:
virtual QPlatformPixmap *createPlatformPixmap(QPlatformPixmap::PixelType type) const;
virtual QPlatformWindow *createPlatformWindow(QWindow *window) const = 0;
- virtual QPlatformWindow *createForeignWindow(QWindow *, WId) const { return 0; }
+ virtual QPlatformWindow *createForeignWindow(QWindow *, WId) const { return nullptr; }
virtual QPlatformBackingStore *createPlatformBackingStore(QWindow *window) const = 0;
#ifndef QT_NO_OPENGL
virtual QPlatformOpenGLContext *createPlatformOpenGLContext(QOpenGLContext *context) const;
diff --git a/src/gui/kernel/qplatformtheme.h b/src/gui/kernel/qplatformtheme.h
index 54c8c70025..356c4ea3ea 100644
--- a/src/gui/kernel/qplatformtheme.h
+++ b/src/gui/kernel/qplatformtheme.h
@@ -309,7 +309,7 @@ public:
virtual QPixmap standardPixmap(StandardPixmap sp, const QSizeF &size) const;
virtual QIcon fileIcon(const QFileInfo &fileInfo,
- QPlatformTheme::IconOptions iconOptions = 0) const;
+ QPlatformTheme::IconOptions iconOptions = nullptr) const;
virtual QIconEngine *createIconEngine(const QString &iconName) const;
#ifndef QT_NO_SHORTCUT
diff --git a/src/gui/kernel/qscreen_p.h b/src/gui/kernel/qscreen_p.h
index f31658355b..8e81c7bf87 100644
--- a/src/gui/kernel/qscreen_p.h
+++ b/src/gui/kernel/qscreen_p.h
@@ -65,8 +65,8 @@ class QScreenPrivate : public QObjectPrivate
Q_DECLARE_PUBLIC(QScreen)
public:
QScreenPrivate()
- : platformScreen(0)
- , orientationUpdateMask(0)
+ : platformScreen(nullptr)
+ , orientationUpdateMask(nullptr)
{
}
diff --git a/src/gui/kernel/qshapedpixmapdndwindow_p.h b/src/gui/kernel/qshapedpixmapdndwindow_p.h
index d9a6ea4888..5089be7284 100644
--- a/src/gui/kernel/qshapedpixmapdndwindow_p.h
+++ b/src/gui/kernel/qshapedpixmapdndwindow_p.h
@@ -63,7 +63,7 @@ class QShapedPixmapWindow : public QRasterWindow
{
Q_OBJECT
public:
- explicit QShapedPixmapWindow(QScreen *screen = 0);
+ explicit QShapedPixmapWindow(QScreen *screen = nullptr);
~QShapedPixmapWindow();
void setUseCompositing(bool on) { m_useCompositing = on; }
diff --git a/src/gui/kernel/qwindow_p.h b/src/gui/kernel/qwindow_p.h
index 25f9a8a9b2..1098321135 100644
--- a/src/gui/kernel/qwindow_p.h
+++ b/src/gui/kernel/qwindow_p.h
@@ -79,8 +79,8 @@ public:
: QObjectPrivate()
, surfaceType(QWindow::RasterSurface)
, windowFlags(Qt::Window)
- , parentWindow(0)
- , platformWindow(0)
+ , parentWindow(nullptr)
+ , platformWindow(nullptr)
, visible(false)
, visibilityOnDestroy(false)
, exposed(false)
@@ -97,8 +97,8 @@ public:
, modality(Qt::NonModal)
, blockedByModalWindow(false)
, updateRequestPending(false)
- , transientParent(0)
- , topLevelScreen(0)
+ , transientParent(nullptr)
+ , topLevelScreen(nullptr)
#ifndef QT_NO_CURSOR
, cursor(Qt::ArrowCursor)
, hasCursor(false)
@@ -119,7 +119,7 @@ public:
void maybeQuitOnLastWindowClosed();
#ifndef QT_NO_CURSOR
- void setCursor(const QCursor *c = 0);
+ void setCursor(const QCursor *c = nullptr);
bool applyCursor();
#endif
diff --git a/src/gui/kernel/qwindowsysteminterface_p.h b/src/gui/kernel/qwindowsysteminterface_p.h
index 6c818a9030..d6513f1836 100644
--- a/src/gui/kernel/qwindowsysteminterface_p.h
+++ b/src/gui/kernel/qwindowsysteminterface_p.h
@@ -123,7 +123,7 @@ public:
class CloseEvent : public WindowSystemEvent {
public:
- explicit CloseEvent(QWindow *w, bool *a = 0)
+ explicit CloseEvent(QWindow *w, bool *a = nullptr)
: WindowSystemEvent(Close), window(w), accepted(a)
{ }
QPointer<QWindow> window;
@@ -398,7 +398,7 @@ public:
class TabletEnterProximityEvent : public InputEvent {
public:
TabletEnterProximityEvent(ulong time, int device, int pointerType, qint64 uid)
- : InputEvent(0, time, TabletEnterProximity, Qt::NoModifier),
+ : InputEvent(nullptr, time, TabletEnterProximity, Qt::NoModifier),
device(device), pointerType(pointerType), uid(uid) { }
int device;
int pointerType;
@@ -408,7 +408,7 @@ public:
class TabletLeaveProximityEvent : public InputEvent {
public:
TabletLeaveProximityEvent(ulong time, int device, int pointerType, qint64 uid)
- : InputEvent(0, time, TabletLeaveProximity, Qt::NoModifier),
+ : InputEvent(nullptr, time, TabletLeaveProximity, Qt::NoModifier),
device(device), pointerType(pointerType), uid(uid) { }
int device;
int pointerType;
@@ -474,7 +474,7 @@ public:
for (int i = 0; i < impl.size(); ++i)
if (!(impl.at(i)->type & QWindowSystemInterfacePrivate::UserInputEvent))
return impl.takeAt(i);
- return 0;
+ return nullptr;
}
bool nonUserInputEventsQueued()
{
@@ -495,7 +495,7 @@ public:
if (impl.at(i)->type == t)
return impl.at(i);
}
- return 0;
+ return nullptr;
}
void remove(const WindowSystemEvent *e)
{
diff --git a/src/gui/opengl/qopenglengineshadermanager_p.h b/src/gui/opengl/qopenglengineshadermanager_p.h
index d43788d777..14c79f5de3 100644
--- a/src/gui/opengl/qopenglengineshadermanager_p.h
+++ b/src/gui/opengl/qopenglengineshadermanager_p.h
@@ -370,7 +370,7 @@ private:
class QOpenGLEngineShaderProg
{
public:
- QOpenGLEngineShaderProg() : program(0) {}
+ QOpenGLEngineShaderProg() : program(nullptr) {}
~QOpenGLEngineShaderProg() {
if (program)
diff --git a/src/gui/opengl/qopenglextensions_p.h b/src/gui/opengl/qopenglextensions_p.h
index af8ee8201d..137f1e831f 100644
--- a/src/gui/opengl/qopenglextensions_p.h
+++ b/src/gui/opengl/qopenglextensions_p.h
@@ -107,7 +107,7 @@ public:
QOpenGLExtensionsPrivate *d() const;
private:
- static bool isInitialized(const QOpenGLFunctionsPrivate *d) { return d != 0; }
+ static bool isInitialized(const QOpenGLFunctionsPrivate *d) { return d != nullptr; }
};
Q_DECLARE_OPERATORS_FOR_FLAGS(QOpenGLExtensions::OpenGLExtensions)
diff --git a/src/gui/opengl/qopenglframebufferobject_p.h b/src/gui/opengl/qopenglframebufferobject_p.h
index 778a38b823..644bb6c59b 100644
--- a/src/gui/opengl/qopenglframebufferobject_p.h
+++ b/src/gui/opengl/qopenglframebufferobject_p.h
@@ -109,8 +109,8 @@ public:
class QOpenGLFramebufferObjectPrivate
{
public:
- QOpenGLFramebufferObjectPrivate() : fbo_guard(0), depth_buffer_guard(0)
- , stencil_buffer_guard(0)
+ QOpenGLFramebufferObjectPrivate() : fbo_guard(nullptr), depth_buffer_guard(nullptr)
+ , stencil_buffer_guard(nullptr)
, valid(false) {}
~QOpenGLFramebufferObjectPrivate() {}
@@ -135,9 +135,9 @@ public:
QOpenGLExtensions funcs;
struct ColorAttachment {
- ColorAttachment() : internalFormat(0), guard(0) { }
+ ColorAttachment() : internalFormat(0), guard(nullptr) { }
ColorAttachment(const QSize &size, GLenum internalFormat)
- : size(size), internalFormat(internalFormat), guard(0) { }
+ : size(size), internalFormat(internalFormat), guard(nullptr) { }
QSize size;
GLenum internalFormat;
QOpenGLSharedResourceGuard *guard;
diff --git a/src/gui/opengl/qopenglpaintengine_p.h b/src/gui/opengl/qopenglpaintengine_p.h
index 15ac240b89..81f17572b2 100644
--- a/src/gui/opengl/qopenglpaintengine_p.h
+++ b/src/gui/opengl/qopenglpaintengine_p.h
@@ -187,9 +187,9 @@ public:
QOpenGL2PaintEngineExPrivate(QOpenGL2PaintEngineEx *q_ptr) :
q(q_ptr),
- shaderManager(0),
+ shaderManager(nullptr),
width(0), height(0),
- ctx(0),
+ ctx(nullptr),
useSystemClip(true),
elementIndicesVBOId(0),
opacityArray(0),
@@ -361,9 +361,9 @@ void QOpenGL2PaintEngineExPrivate::uploadData(unsigned int arrayIndex, const GLf
opacityBuffer.allocate(data, count * sizeof(float));
}
if (arrayIndex == QT_OPACITY_ATTR)
- funcs.glVertexAttribPointer(arrayIndex, 1, GL_FLOAT, GL_FALSE, 0, 0);
+ funcs.glVertexAttribPointer(arrayIndex, 1, GL_FLOAT, GL_FALSE, 0, nullptr);
else
- funcs.glVertexAttribPointer(arrayIndex, 2, GL_FLOAT, GL_FALSE, 0, 0);
+ funcs.glVertexAttribPointer(arrayIndex, 2, GL_FLOAT, GL_FALSE, 0, nullptr);
} else {
// If we already uploaded the data we don't have to do it again
if (data == vertexAttribPointers[arrayIndex])
diff --git a/src/gui/opengl/qopenglqueryhelper_p.h b/src/gui/opengl/qopenglqueryhelper_p.h
index 60dbf9c743..ad91ca9f96 100644
--- a/src/gui/opengl/qopenglqueryhelper_p.h
+++ b/src/gui/opengl/qopenglqueryhelper_p.h
@@ -65,18 +65,18 @@ class QOpenGLQueryHelper
{
public:
QOpenGLQueryHelper(QOpenGLContext *context)
- : GetQueryObjectuiv(0),
- GetQueryObjectiv(0),
- GetQueryiv(0),
- EndQuery(0),
- BeginQuery(0),
- IsQuery(0),
- DeleteQueries(0),
- GenQueries(0),
- GetInteger64v(0),
- GetQueryObjectui64v(0),
- GetQueryObjecti64v(0),
- QueryCounter(0)
+ : GetQueryObjectuiv(nullptr),
+ GetQueryObjectiv(nullptr),
+ GetQueryiv(nullptr),
+ EndQuery(nullptr),
+ BeginQuery(nullptr),
+ IsQuery(nullptr),
+ DeleteQueries(nullptr),
+ GenQueries(nullptr),
+ GetInteger64v(nullptr),
+ GetQueryObjectui64v(nullptr),
+ GetQueryObjecti64v(nullptr),
+ QueryCounter(nullptr)
{
Q_ASSERT(context);
diff --git a/src/gui/opengl/qopengltextureglyphcache_p.h b/src/gui/opengl/qopengltextureglyphcache_p.h
index 598cb00ee5..aed128cf9e 100644
--- a/src/gui/opengl/qopengltextureglyphcache_p.h
+++ b/src/gui/opengl/qopengltextureglyphcache_p.h
@@ -139,7 +139,7 @@ public:
inline void setPaintEnginePrivate(QOpenGL2PaintEngineExPrivate *p) { pex = p; }
- inline const QOpenGLContextGroup *contextGroup() const { return m_textureResource ? m_textureResource->group() : 0; }
+ inline const QOpenGLContextGroup *contextGroup() const { return m_textureResource ? m_textureResource->group() : nullptr; }
inline int serialNumber() const { return m_serialNumber; }
diff --git a/src/gui/opengl/qopengltexturehelper_p.h b/src/gui/opengl/qopengltexturehelper_p.h
index 00f6f9e5aa..62d0125daf 100644
--- a/src/gui/opengl/qopengltexturehelper_p.h
+++ b/src/gui/opengl/qopengltexturehelper_p.h
@@ -167,7 +167,7 @@ public:
inline void glTextureSubImage3D(GLuint texture, GLenum target, GLenum bindingTarget, GLint level, GLint xoffset, GLint yoffset, GLint zoffset,
GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type,
- const GLvoid *pixels, const QOpenGLPixelTransferOptions * const options = 0)
+ const GLvoid *pixels, const QOpenGLPixelTransferOptions * const options = nullptr)
{
if (options) {
QOpenGLPixelTransferOptions oldOptions = savePixelUploadOptions();
@@ -181,7 +181,7 @@ public:
inline void glTextureSubImage2D(GLuint texture, GLenum target, GLenum bindingTarget, GLint level, GLint xoffset, GLint yoffset,
GLsizei width, GLsizei height, GLenum format, GLenum type,
- const GLvoid *pixels, const QOpenGLPixelTransferOptions * const options = 0)
+ const GLvoid *pixels, const QOpenGLPixelTransferOptions * const options = nullptr)
{
if (options) {
QOpenGLPixelTransferOptions oldOptions = savePixelUploadOptions();
@@ -195,7 +195,7 @@ public:
inline void glTextureSubImage1D(GLuint texture, GLenum target, GLenum bindingTarget, GLint level, GLint xoffset,
GLsizei width, GLenum format, GLenum type,
- const GLvoid *pixels, const QOpenGLPixelTransferOptions * const options = 0)
+ const GLvoid *pixels, const QOpenGLPixelTransferOptions * const options = nullptr)
{
if (options) {
QOpenGLPixelTransferOptions oldOptions = savePixelUploadOptions();
@@ -222,7 +222,7 @@ public:
inline void glCompressedTextureSubImage1D(GLuint texture, GLenum target, GLenum bindingTarget, GLint level,
GLint xoffset, GLsizei width,
GLenum format, GLsizei imageSize, const GLvoid *bits,
- const QOpenGLPixelTransferOptions * const options = 0)
+ const QOpenGLPixelTransferOptions * const options = nullptr)
{
if (options) {
QOpenGLPixelTransferOptions oldOptions = savePixelUploadOptions();
@@ -238,7 +238,7 @@ public:
GLint xoffset, GLint yoffset,
GLsizei width, GLsizei height,
GLenum format, GLsizei imageSize, const GLvoid *bits,
- const QOpenGLPixelTransferOptions * const options = 0)
+ const QOpenGLPixelTransferOptions * const options = nullptr)
{
if (options) {
QOpenGLPixelTransferOptions oldOptions = savePixelUploadOptions();
@@ -254,7 +254,7 @@ public:
GLint xoffset, GLint yoffset, GLint zoffset,
GLsizei width, GLsizei height, GLsizei depth,
GLenum format, GLsizei imageSize, const GLvoid *bits,
- const QOpenGLPixelTransferOptions * const options = 0)
+ const QOpenGLPixelTransferOptions * const options = nullptr)
{
if (options) {
QOpenGLPixelTransferOptions oldOptions = savePixelUploadOptions();
@@ -269,7 +269,7 @@ public:
inline void glCompressedTextureImage1D(GLuint texture, GLenum target, GLenum bindingTarget, GLint level,
GLenum internalFormat, GLsizei width,
GLint border, GLsizei imageSize, const GLvoid *bits,
- const QOpenGLPixelTransferOptions * const options = 0)
+ const QOpenGLPixelTransferOptions * const options = nullptr)
{
if (options) {
QOpenGLPixelTransferOptions oldOptions = savePixelUploadOptions();
@@ -284,7 +284,7 @@ public:
inline void glCompressedTextureImage2D(GLuint texture, GLenum target, GLenum bindingTarget, GLint level,
GLenum internalFormat, GLsizei width, GLsizei height,
GLint border, GLsizei imageSize, const GLvoid *bits,
- const QOpenGLPixelTransferOptions * const options = 0)
+ const QOpenGLPixelTransferOptions * const options = nullptr)
{
if (options) {
@@ -300,7 +300,7 @@ public:
inline void glCompressedTextureImage3D(GLuint texture, GLenum target, GLenum bindingTarget, GLint level,
GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth,
GLint border, GLsizei imageSize, const GLvoid *bits,
- const QOpenGLPixelTransferOptions * const options = 0)
+ const QOpenGLPixelTransferOptions * const options = nullptr)
{
if (options) {
QOpenGLPixelTransferOptions oldOptions = savePixelUploadOptions();
diff --git a/src/gui/painting/qcosmeticstroker_p.h b/src/gui/painting/qcosmeticstroker_p.h
index 082ddee30f..8571b0476a 100644
--- a/src/gui/painting/qcosmeticstroker_p.h
+++ b/src/gui/painting/qcosmeticstroker_p.h
@@ -98,8 +98,8 @@ public:
: state(s),
deviceRect(dr_unclipped),
clip(dr),
- pattern(0),
- reversePattern(0),
+ pattern(nullptr),
+ reversePattern(nullptr),
patternSize(0),
patternLength(0),
patternOffset(0),
diff --git a/src/gui/painting/qdatabuffer_p.h b/src/gui/painting/qdatabuffer_p.h
index 28d5f6d6c5..181d19da0b 100644
--- a/src/gui/painting/qdatabuffer_p.h
+++ b/src/gui/painting/qdatabuffer_p.h
@@ -69,7 +69,7 @@ public:
buffer = (Type*) malloc(capacity * sizeof(Type));
Q_CHECK_PTR(buffer);
} else {
- buffer = 0;
+ buffer = nullptr;
}
siz = 0;
}
@@ -128,7 +128,7 @@ public:
Q_CHECK_PTR(buffer);
} else {
free(buffer);
- buffer = 0;
+ buffer = nullptr;
}
}
diff --git a/src/gui/painting/qdrawhelper_p.h b/src/gui/painting/qdrawhelper_p.h
index 37108949d6..1e99a34842 100644
--- a/src/gui/painting/qdrawhelper_p.h
+++ b/src/gui/painting/qdrawhelper_p.h
@@ -328,7 +328,7 @@ struct QTextureData
struct QSpanData
{
- QSpanData() : tempImage(0) {}
+ QSpanData() : tempImage(nullptr) {}
~QSpanData() { delete tempImage; }
QRasterBuffer *rasterBuffer;
diff --git a/src/gui/painting/qoutlinemapper_p.h b/src/gui/painting/qoutlinemapper_p.h
index 71999fbdee..04a68797c2 100644
--- a/src/gui/painting/qoutlinemapper_p.h
+++ b/src/gui/painting/qoutlinemapper_p.h
@@ -180,13 +180,13 @@ public:
QT_FT_Outline *outline() {
if (m_valid)
return &m_outline;
- return 0;
+ return nullptr;
}
QT_FT_Outline *convertPath(const QPainterPath &path);
QT_FT_Outline *convertPath(const QVectorPath &path);
- inline QPainterPath::ElementType *elementTypes() const { return m_element_types.size() == 0 ? 0 : m_element_types.data(); }
+ inline QPainterPath::ElementType *elementTypes() const { return m_element_types.size() == 0 ? nullptr : m_element_types.data(); }
public:
QDataBuffer<QPainterPath::ElementType> m_element_types;
diff --git a/src/gui/painting/qpaintengine_p.h b/src/gui/painting/qpaintengine_p.h
index 8ac3fcff5c..40b9474165 100644
--- a/src/gui/painting/qpaintengine_p.h
+++ b/src/gui/painting/qpaintengine_p.h
@@ -65,7 +65,7 @@ class Q_GUI_EXPORT QPaintEnginePrivate
{
Q_DECLARE_PUBLIC(QPaintEngine)
public:
- QPaintEnginePrivate() : pdev(0), q_ptr(0), currentClipDevice(0), hasSystemTransform(0),
+ QPaintEnginePrivate() : pdev(nullptr), q_ptr(nullptr), currentClipDevice(nullptr), hasSystemTransform(0),
hasSystemViewport(0) {}
virtual ~QPaintEnginePrivate();
@@ -138,8 +138,8 @@ public:
static QPaintEnginePrivate *get(QPaintEngine *paintEngine) { return paintEngine->d_func(); }
- virtual QPaintEngine *aggregateEngine() { return 0; }
- virtual Qt::HANDLE nativeHandle() { return 0; }
+ virtual QPaintEngine *aggregateEngine() { return nullptr; }
+ virtual Qt::HANDLE nativeHandle() { return nullptr; }
};
QT_END_NAMESPACE
diff --git a/src/gui/painting/qpaintengine_raster_p.h b/src/gui/painting/qpaintengine_raster_p.h
index c3734f1c62..500e0fae54 100644
--- a/src/gui/painting/qpaintengine_raster_p.h
+++ b/src/gui/painting/qpaintengine_raster_p.h
@@ -426,7 +426,7 @@ inline void QClipData::appendSpans(const QSpan *s, int num)
class QRasterBuffer
{
public:
- QRasterBuffer() : m_width(0), m_height(0), m_buffer(0) { init(); }
+ QRasterBuffer() : m_width(0), m_height(0), m_buffer(nullptr) { init(); }
~QRasterBuffer();
diff --git a/src/gui/painting/qpainter_p.h b/src/gui/painting/qpainter_p.h
index 9857a59070..bd2bc4c9b3 100644
--- a/src/gui/painting/qpainter_p.h
+++ b/src/gui/painting/qpainter_p.h
@@ -193,9 +193,9 @@ class QPainterPrivate
Q_DECLARE_PUBLIC(QPainter)
public:
QPainterPrivate(QPainter *painter)
- : q_ptr(painter), d_ptrs(0), state(0), dummyState(0), txinv(0), inDestructor(false), d_ptrs_size(0),
- refcount(1), device(0), original_device(0), helper_device(0), engine(0), emulationEngine(0),
- extended(0)
+ : q_ptr(painter), d_ptrs(nullptr), state(nullptr), dummyState(nullptr), txinv(0), inDestructor(false), d_ptrs_size(0),
+ refcount(1), device(nullptr), original_device(nullptr), helper_device(nullptr), engine(nullptr), emulationEngine(nullptr),
+ extended(nullptr)
{
}
diff --git a/src/gui/painting/qpainterpath_p.h b/src/gui/painting/qpainterpath_p.h
index a36c8005bc..98056483bc 100644
--- a/src/gui/painting/qpainterpath_p.h
+++ b/src/gui/painting/qpainterpath_p.h
@@ -168,7 +168,7 @@ public:
fillRule(Qt::OddEvenFill),
dirtyBounds(false),
dirtyControlBounds(false),
- pathConverter(0)
+ pathConverter(nullptr)
{
require_moveTo = false;
convex = false;
@@ -181,7 +181,7 @@ public:
dirtyBounds(other.dirtyBounds),
dirtyControlBounds(other.dirtyControlBounds),
convex(other.convex),
- pathConverter(0)
+ pathConverter(nullptr)
{
require_moveTo = false;
elements = other.elements;
diff --git a/src/gui/painting/qpathclipper_p.h b/src/gui/painting/qpathclipper_p.h
index c25a479807..9444a87b71 100644
--- a/src/gui/painting/qpathclipper_p.h
+++ b/src/gui/painting/qpathclipper_p.h
@@ -82,7 +82,7 @@ public:
bool intersect();
bool contains();
- static bool pathToRect(const QPainterPath &path, QRectF *rect = 0);
+ static bool pathToRect(const QPainterPath &path, QRectF *rect = nullptr);
static QPainterPath intersect(const QPainterPath &path, const QRectF &rect);
private:
@@ -394,7 +394,7 @@ inline const QPathSegments::Intersection *QPathSegments::intersectionAt(int inde
{
const int intersection = m_segments.at(index).intersection;
if (intersection < 0)
- return 0;
+ return nullptr;
else
return &m_intersections.at(intersection);
}
@@ -428,12 +428,12 @@ inline int QWingedEdge::edgeCount() const
inline QPathEdge *QWingedEdge::edge(int edge)
{
- return edge < 0 ? 0 : &m_edges.at(edge);
+ return edge < 0 ? nullptr : &m_edges.at(edge);
}
inline const QPathEdge *QWingedEdge::edge(int edge) const
{
- return edge < 0 ? 0 : &m_edges.at(edge);
+ return edge < 0 ? nullptr : &m_edges.at(edge);
}
inline int QWingedEdge::vertexCount() const
@@ -449,12 +449,12 @@ inline int QWingedEdge::addVertex(const QPointF &p)
inline QPathVertex *QWingedEdge::vertex(int vertex)
{
- return vertex < 0 ? 0 : &m_vertices.at(vertex);
+ return vertex < 0 ? nullptr : &m_vertices.at(vertex);
}
inline const QPathVertex *QWingedEdge::vertex(int vertex) const
{
- return vertex < 0 ? 0 : &m_vertices.at(vertex);
+ return vertex < 0 ? nullptr : &m_vertices.at(vertex);
}
inline QPathEdge::Traversal QWingedEdge::flip(QPathEdge::Traversal traversal)
diff --git a/src/gui/painting/qplatformbackingstore.h b/src/gui/painting/qplatformbackingstore.h
index de5ba964dc..414d2bf0de 100644
--- a/src/gui/painting/qplatformbackingstore.h
+++ b/src/gui/painting/qplatformbackingstore.h
@@ -85,7 +85,7 @@ public:
};
Q_DECLARE_FLAGS(Flags, Flag)
- explicit QPlatformTextureList(QObject *parent = 0);
+ explicit QPlatformTextureList(QObject *parent = nullptr);
~QPlatformTextureList();
int count() const;
@@ -99,7 +99,7 @@ public:
bool isLocked() const;
void appendTexture(void *source, GLuint textureId, const QRect &geometry,
- const QRect &clipRect = QRect(), Flags flags = 0);
+ const QRect &clipRect = QRect(), Flags flags = nullptr);
void clear();
Q_SIGNALS:
diff --git a/src/gui/painting/qrbtree_p.h b/src/gui/painting/qrbtree_p.h
index d3ee23a91c..42e88889a1 100644
--- a/src/gui/painting/qrbtree_p.h
+++ b/src/gui/painting/qrbtree_p.h
@@ -60,7 +60,7 @@ struct QRBTree
{
struct Node
{
- inline Node() : parent(0), left(0), right(0), red(true) { }
+ inline Node() : parent(nullptr), left(nullptr), right(nullptr), red(true) { }
inline ~Node() {if (left) delete left; if (right) delete right;}
T data;
Node *parent;
@@ -69,7 +69,7 @@ struct QRBTree
bool red;
};
- inline QRBTree() : root(0), freeList(0) { }
+ inline QRBTree() : root(nullptr), freeList(nullptr) { }
inline ~QRBTree();
inline void clear();
@@ -120,7 +120,7 @@ inline QRBTree<T>::~QRBTree()
while (freeList) {
// Avoid recursively calling the destructor, as this list may become large.
Node *next = freeList->right;
- freeList->right = 0;
+ freeList->right = nullptr;
delete freeList;
freeList = next;
}
@@ -131,7 +131,7 @@ inline void QRBTree<T>::clear()
{
if (root)
delete root;
- root = 0;
+ root = nullptr;
}
template <class T>
@@ -359,7 +359,7 @@ void QRBTree<T>::detach(Node *node) // call this before removing a node.
ref = child;
if (child)
child->parent = node->parent;
- node->left = node->right = node->parent = 0;
+ node->left = node->right = node->parent = nullptr;
}
// 'node' must be black. rebalance will reduce the depth of black nodes by one in the sibling tree.
@@ -513,7 +513,7 @@ inline void QRBTree<T>::deleteNode(Node *&node)
detach(node);
node->right = freeList;
freeList = node;
- node = 0;
+ node = nullptr;
}
template <class T>
@@ -522,7 +522,7 @@ inline typename QRBTree<T>::Node *QRBTree<T>::newNode()
if (freeList) {
Node *node = freeList;
freeList = freeList->right;
- node->parent = node->left = node->right = 0;
+ node->parent = node->left = node->right = nullptr;
node->red = true;
return node;
}
diff --git a/src/gui/painting/qtextureglyphcache_p.h b/src/gui/painting/qtextureglyphcache_p.h
index 3da28872b1..1e83ab46d1 100644
--- a/src/gui/painting/qtextureglyphcache_p.h
+++ b/src/gui/painting/qtextureglyphcache_p.h
@@ -75,7 +75,7 @@ class Q_GUI_EXPORT QTextureGlyphCache : public QFontEngineGlyphCache
{
public:
QTextureGlyphCache(QFontEngine::GlyphFormat format, const QTransform &matrix)
- : QFontEngineGlyphCache(format, matrix), m_current_fontengine(0),
+ : QFontEngineGlyphCache(format, matrix), m_current_fontengine(nullptr),
m_w(0), m_h(0), m_cx(0), m_cy(0), m_currentRowHeight(0)
{ }
diff --git a/src/gui/painting/qvectorpath_p.h b/src/gui/painting/qvectorpath_p.h
index 1b649a5d2a..df5772d4cc 100644
--- a/src/gui/painting/qvectorpath_p.h
+++ b/src/gui/painting/qvectorpath_p.h
@@ -106,7 +106,7 @@ public:
// ### Falcon: introduca a struct XY for points so lars is not so confused...
QVectorPath(const qreal *points,
int count,
- const QPainterPath::ElementType *elements = 0,
+ const QPainterPath::ElementType *elements = nullptr,
uint hints = ArbitraryShapeHint)
: m_elements(elements),
m_points(points),
@@ -128,12 +128,12 @@ public:
inline bool hasExplicitOpen() const { return m_hints & ExplicitOpen; }
inline bool hasWindingFill() const { return m_hints & WindingFill; }
- inline void makeCacheable() const { m_hints |= ShouldUseCacheHint; m_cache = 0; }
+ inline void makeCacheable() const { m_hints |= ShouldUseCacheHint; m_cache = nullptr; }
inline uint hints() const { return m_hints; }
inline const QPainterPath::ElementType *elements() const { return m_elements; }
inline const qreal *points() const { return m_points; }
- inline bool isEmpty() const { return m_points == 0; }
+ inline bool isEmpty() const { return m_points == nullptr; }
inline int elementCount() const { return m_count; }
inline const QPainterPath convertToPainterPath() const;
@@ -165,7 +165,7 @@ public:
return e;
e = e->next;
}
- return 0;
+ return nullptr;
}
template <typename T> static inline bool isRect(const T *pts, int elementCount) {
diff --git a/src/gui/text/qabstracttextdocumentlayout_p.h b/src/gui/text/qabstracttextdocumentlayout_p.h
index 191c463dc6..d631ce3197 100644
--- a/src/gui/text/qabstracttextdocumentlayout_p.h
+++ b/src/gui/text/qabstracttextdocumentlayout_p.h
@@ -59,7 +59,7 @@ QT_BEGIN_NAMESPACE
struct QTextObjectHandler
{
- QTextObjectHandler() : iface(0) {}
+ QTextObjectHandler() : iface(nullptr) {}
QTextObjectInterface *iface;
QPointer<QObject> component;
};
@@ -71,12 +71,12 @@ public:
Q_DECLARE_PUBLIC(QAbstractTextDocumentLayout)
inline QAbstractTextDocumentLayoutPrivate()
- : paintDevice(0) {}
+ : paintDevice(nullptr) {}
~QAbstractTextDocumentLayoutPrivate();
inline void setDocument(QTextDocument *doc) {
document = doc;
- docPrivate = 0;
+ docPrivate = nullptr;
if (doc)
docPrivate = doc->docHandle();
}
diff --git a/src/gui/text/qcssparser_p.h b/src/gui/text/qcssparser_p.h
index 860bbe382a..62578f75e5 100644
--- a/src/gui/text/qcssparser_p.h
+++ b/src/gui/text/qcssparser_p.h
@@ -467,8 +467,8 @@ struct Q_GUI_EXPORT Declaration
Attachment attachmentValue() const;
int styleFeaturesValue() const;
- bool intValue(int *i, const char *unit = 0) const;
- bool realValue(qreal *r, const char *unit = 0) const;
+ bool intValue(int *i, const char *unit = nullptr) const;
+ bool realValue(qreal *r, const char *unit = nullptr) const;
QSize sizeValue() const;
QRect rectValue() const;
@@ -584,7 +584,7 @@ struct Q_GUI_EXPORT Selector
{
QVector<BasicSelector> basicSelectors;
int specificity() const;
- quint64 pseudoClass(quint64 *negated = 0) const;
+ quint64 pseudoClass(quint64 *negated = nullptr) const;
QString pseudoElement() const;
};
QT_CSS_DECLARE_TYPEINFO(Selector, Q_MOVABLE_TYPE)
@@ -656,7 +656,7 @@ public:
};
QVector<StyleRule> styleRulesForNode(NodePtr node);
- QVector<Declaration> declarationsForNode(NodePtr node, const char *extraPseudo = 0);
+ QVector<Declaration> declarationsForNode(NodePtr node, const char *extraPseudo = nullptr);
virtual bool nodeNameEquals(NodePtr node, const QString& nodeName) const;
virtual QString attribute(NodePtr node, const QString &name) const = 0;
@@ -744,7 +744,7 @@ QT_CSS_DECLARE_TYPEINFO(Symbol, Q_MOVABLE_TYPE)
class Q_GUI_EXPORT Scanner
{
public:
- static QString preprocess(const QString &input, bool *hasEscapeSequences = 0);
+ static QString preprocess(const QString &input, bool *hasEscapeSequences = nullptr);
static void scan(const QString &preprocessedInput, QVector<Symbol> *symbols);
};
@@ -845,7 +845,7 @@ struct Q_GUI_EXPORT ValueExtractor
bool extractGeometry(int *w, int *h, int *minw, int *minh, int *maxw, int *maxh);
bool extractPosition(int *l, int *t, int *r, int *b, QCss::Origin *, Qt::Alignment *,
QCss::PositionMode *, Qt::Alignment *);
- bool extractBox(int *margins, int *paddings, int *spacing = 0);
+ bool extractBox(int *margins, int *paddings, int *spacing = nullptr);
bool extractBorder(int *borders, QBrush *colors, BorderStyle *Styles, QSize *radii);
bool extractOutline(int *borders, QBrush *colors, BorderStyle *Styles, QSize *radii, int *offsets);
bool extractPalette(QBrush *fg, QBrush *sfg, QBrush *sbg, QBrush *abg);
diff --git a/src/gui/text/qdistancefield_p.h b/src/gui/text/qdistancefield_p.h
index 31cdf7edd2..1a1b6866a2 100644
--- a/src/gui/text/qdistancefield_p.h
+++ b/src/gui/text/qdistancefield_p.h
@@ -72,7 +72,7 @@ int Q_GUI_EXPORT QT_DISTANCEFIELD_HIGHGLYPHCOUNT();
class Q_GUI_EXPORT QDistanceFieldData : public QSharedData
{
public:
- QDistanceFieldData() : glyph(0), width(0), height(0), nbytes(0), data(0) {}
+ QDistanceFieldData() : glyph(0), width(0), height(0), nbytes(0), data(nullptr) {}
QDistanceFieldData(const QDistanceFieldData &other);
~QDistanceFieldData();
diff --git a/src/gui/text/qfont_p.h b/src/gui/text/qfont_p.h
index e86ec31e47..6156faa788 100644
--- a/src/gui/text/qfont_p.h
+++ b/src/gui/text/qfont_p.h
@@ -266,7 +266,7 @@ public:
// QFontEngine cache
struct Engine {
- Engine() : data(0), timestamp(0), hits(0) { }
+ Engine() : data(nullptr), timestamp(0), hits(0) { }
Engine(QFontEngine *d) : data(d), timestamp(0), hits(0) { }
QFontEngine *data;
diff --git a/src/gui/text/qfontengine_p.h b/src/gui/text/qfontengine_p.h
index 708c79c2ae..05c6746185 100644
--- a/src/gui/text/qfontengine_p.h
+++ b/src/gui/text/qfontengine_p.h
@@ -194,7 +194,7 @@ public:
virtual QImage *lockedAlphaMapForGlyph(glyph_t glyph, QFixed subPixelPosition,
GlyphFormat neededFormat,
const QTransform &t = QTransform(),
- QPoint *offset = 0);
+ QPoint *offset = nullptr);
virtual void unlockAlphaMapForGlyph();
virtual bool hasInternalCaching() const { return false; }
@@ -224,7 +224,7 @@ public:
virtual qreal minLeftBearing() const;
virtual qreal minRightBearing() const;
- virtual void getGlyphBearings(glyph_t glyph, qreal *leftBearing = 0, qreal *rightBearing = 0);
+ virtual void getGlyphBearings(glyph_t glyph, qreal *leftBearing = nullptr, qreal *rightBearing = nullptr);
inline bool canRender(uint ucs4) const { return glyphIndex(ucs4) != 0; }
virtual bool canRender(const QChar *str, int len) const;
@@ -234,7 +234,7 @@ public:
virtual int glyphCount() const;
virtual int glyphMargin(GlyphFormat format) { return format == Format_A32 ? 2 : 0; }
- virtual QFontEngine *cloneWithSize(qreal /*pixelSize*/) const { return 0; }
+ virtual QFontEngine *cloneWithSize(qreal /*pixelSize*/) const { return nullptr; }
virtual Qt::HANDLE handle() const;
@@ -458,7 +458,7 @@ public:
virtual void recalcAdvances(QGlyphLayout *, ShaperFlags) const override;
virtual void doKerning(QGlyphLayout *, ShaperFlags) const override;
virtual void addOutlineToPath(qreal, qreal, const QGlyphLayout &, QPainterPath *, QTextItem::RenderFlags flags) override;
- virtual void getGlyphBearings(glyph_t glyph, qreal *leftBearing = 0, qreal *rightBearing = 0) override;
+ virtual void getGlyphBearings(glyph_t glyph, qreal *leftBearing = nullptr, qreal *rightBearing = nullptr) override;
virtual QFixed ascent() const override;
virtual QFixed capHeight() const override;
diff --git a/src/gui/text/qfragmentmap_p.h b/src/gui/text/qfragmentmap_p.h
index 35f60ac961..1d781352f8 100644
--- a/src/gui/text/qfragmentmap_p.h
+++ b/src/gui/text/qfragmentmap_p.h
@@ -216,7 +216,7 @@ private:
template <class Fragment>
QFragmentMapData<Fragment>::QFragmentMapData()
- : fragments(0)
+ : fragments(nullptr)
{
init();
}
diff --git a/src/gui/text/qglyphrun_p.h b/src/gui/text/qglyphrun_p.h
index 5b6bdad648..465c3c7000 100644
--- a/src/gui/text/qglyphrun_p.h
+++ b/src/gui/text/qglyphrun_p.h
@@ -65,7 +65,7 @@ class QGlyphRunPrivate: public QSharedData
{
public:
QGlyphRunPrivate()
- : flags(0)
+ : flags(nullptr)
, glyphIndexData(glyphIndexes.constData())
, glyphIndexDataSize(0)
, glyphPositionData(glyphPositions.constData())
diff --git a/src/gui/text/qrawfont_p.h b/src/gui/text/qrawfont_p.h
index 0fc8739bfb..dced165475 100644
--- a/src/gui/text/qrawfont_p.h
+++ b/src/gui/text/qrawfont_p.h
@@ -67,9 +67,9 @@ class Q_GUI_EXPORT QRawFontPrivate
{
public:
QRawFontPrivate()
- : fontEngine(0)
+ : fontEngine(nullptr)
, hintingPreference(QFont::PreferDefaultHinting)
- , thread(0)
+ , thread(nullptr)
{}
QRawFontPrivate(const QRawFontPrivate &other)
@@ -78,9 +78,9 @@ public:
, thread(other.thread)
{
#ifndef QT_NO_DEBUG
- Q_ASSERT(fontEngine == 0 || thread == QThread::currentThread());
+ Q_ASSERT(fontEngine == nullptr || thread == QThread::currentThread());
#endif
- if (fontEngine != 0)
+ if (fontEngine != nullptr)
fontEngine->ref.ref();
}
@@ -94,37 +94,37 @@ public:
inline void cleanUp()
{
- setFontEngine(0);
+ setFontEngine(nullptr);
hintingPreference = QFont::PreferDefaultHinting;
}
inline bool isValid() const
{
#ifndef QT_NO_DEBUG
- Q_ASSERT(fontEngine == 0 || thread == QThread::currentThread());
+ Q_ASSERT(fontEngine == nullptr || thread == QThread::currentThread());
#endif
- return fontEngine != 0;
+ return fontEngine != nullptr;
}
inline void setFontEngine(QFontEngine *engine)
{
#ifndef QT_NO_DEBUG
- Q_ASSERT(fontEngine == 0 || thread == QThread::currentThread());
+ Q_ASSERT(fontEngine == nullptr || thread == QThread::currentThread());
#endif
if (fontEngine == engine)
return;
- if (fontEngine != 0) {
+ if (fontEngine != nullptr) {
if (!fontEngine->ref.deref())
delete fontEngine;
#ifndef QT_NO_DEBUG
- thread = 0;
+ thread = nullptr;
#endif
}
fontEngine = engine;
- if (fontEngine != 0) {
+ if (fontEngine != nullptr) {
fontEngine->ref.ref();
#ifndef QT_NO_DEBUG
thread = QThread::currentThread();
diff --git a/src/gui/text/qstatictext_p.h b/src/gui/text/qstatictext_p.h
index 4ec09297c5..8d6792216d 100644
--- a/src/gui/text/qstatictext_p.h
+++ b/src/gui/text/qstatictext_p.h
@@ -80,7 +80,7 @@ class Q_GUI_EXPORT QStaticTextItem
public:
QStaticTextItem() : useBackendOptimizations(false),
userDataNeedsUpdate(0), usesRawFont(0),
- m_fontEngine(0), m_userData(0) {}
+ m_fontEngine(nullptr), m_userData(nullptr) {}
void setUserData(QStaticTextUserData *newUserData)
{
diff --git a/src/gui/text/qtextdocument_p.h b/src/gui/text/qtextdocument_p.h
index cad9131fbf..d95f5bef6a 100644
--- a/src/gui/text/qtextdocument_p.h
+++ b/src/gui/text/qtextdocument_p.h
@@ -101,10 +101,10 @@ class QTextBlockData : public QFragment<3>
{
public:
inline void initialize()
- { layout = 0; userData = 0; userState = -1; revision = 0; hidden = 0; }
+ { layout = nullptr; userData = nullptr; userState = -1; revision = 0; hidden = 0; }
void invalidate() const;
inline void free()
- { delete layout; layout = 0; delete userData; userData = 0; }
+ { delete layout; layout = nullptr; delete userData; userData = nullptr; }
mutable int format;
// ##### probably store a QTextEngine * here!
diff --git a/src/gui/text/qtextdocumentfragment_p.h b/src/gui/text/qtextdocumentfragment_p.h
index de01a02fbb..67b0c2c600 100644
--- a/src/gui/text/qtextdocumentfragment_p.h
+++ b/src/gui/text/qtextdocumentfragment_p.h
@@ -125,7 +125,7 @@ public:
QTextHtmlImporter(QTextDocument *_doc, const QString &html,
ImportMode mode,
- const QTextDocument *resourceProvider = 0);
+ const QTextDocument *resourceProvider = nullptr);
void import();
@@ -163,7 +163,7 @@ private:
#endif
struct TableCellIterator
{
- inline TableCellIterator(QTextTable *t = 0) : table(t), row(0), column(0) {}
+ inline TableCellIterator(QTextTable *t = nullptr) : table(t), row(0), column(0) {}
inline TableCellIterator &operator++() {
if (atEnd())
@@ -182,7 +182,7 @@ private:
return *this;
}
- inline bool atEnd() const { return table == 0 || row >= table->rows(); }
+ inline bool atEnd() const { return table == nullptr || row >= table->rows(); }
QTextTableCell cell() const { return table->cellAt(row, column); }
diff --git a/src/gui/text/qtextengine_p.h b/src/gui/text/qtextengine_p.h
index e9187ea605..fb2e812183 100644
--- a/src/gui/text/qtextengine_p.h
+++ b/src/gui/text/qtextengine_p.h
@@ -304,8 +304,8 @@ class QTextItemInt : public QTextItem
{
public:
inline QTextItemInt()
- : justified(false), underlineStyle(QTextCharFormat::NoUnderline), num_chars(0), chars(0),
- logClusters(0), f(0), fontEngine(0)
+ : justified(false), underlineStyle(QTextCharFormat::NoUnderline), num_chars(0), chars(nullptr),
+ logClusters(nullptr), f(nullptr), fontEngine(nullptr)
{}
QTextItemInt(const QScriptItem &si, QFont *font, const QTextCharFormat &format = QTextCharFormat());
QTextItemInt(const QGlyphLayout &g, QFont *font, const QChar *chars, int numChars, QFontEngine *fe,
@@ -484,7 +484,7 @@ public:
return end - si->position;
}
- QFontEngine *fontEngine(const QScriptItem &si, QFixed *ascent = 0, QFixed *descent = 0, QFixed *leading = 0) const;
+ QFontEngine *fontEngine(const QScriptItem &si, QFixed *ascent = nullptr, QFixed *descent = nullptr, QFixed *leading = nullptr) const;
QFont font(const QScriptItem &si) const;
inline QFont font() const { return fnt; }
@@ -530,7 +530,7 @@ public:
inline QTextFormatCollection *formatCollection() const {
if (block.docHandle())
return block.docHandle()->formatCollection();
- return specialData ? specialData->formatCollection.data() : 0;
+ return specialData ? specialData->formatCollection.data() : nullptr;
}
QTextCharFormat format(const QScriptItem *si) const;
inline QAbstractTextDocumentLayout *docLayout() const {
@@ -553,8 +553,8 @@ private:
mutable int prevPosition;
mutable int prevLength;
inline void reset() {
- prevFontEngine = 0;
- prevScaledFontEngine = 0;
+ prevFontEngine = nullptr;
+ prevScaledFontEngine = nullptr;
prevScript = -1;
prevPosition = -1;
prevLength = -1;
@@ -684,7 +684,7 @@ Q_DECLARE_TYPEINFO(QTextEngine::ItemDecoration, Q_MOVABLE_TYPE);
struct QTextLineItemIterator
{
QTextLineItemIterator(QTextEngine *eng, int lineNum, const QPointF &pos = QPointF(),
- const QTextLayout::FormatRange *_selection = 0);
+ const QTextLayout::FormatRange *_selection = nullptr);
inline bool atEnd() const { return logicalItem >= nItems - 1; }
inline bool atBeginning() const { return logicalItem <= 0; }
diff --git a/src/gui/text/qtextimagehandler_p.h b/src/gui/text/qtextimagehandler_p.h
index 339ef0af4f..fafd394ad3 100644
--- a/src/gui/text/qtextimagehandler_p.h
+++ b/src/gui/text/qtextimagehandler_p.h
@@ -65,7 +65,7 @@ class Q_GUI_EXPORT QTextImageHandler : public QObject,
Q_OBJECT
Q_INTERFACES(QTextObjectInterface)
public:
- explicit QTextImageHandler(QObject *parent = 0);
+ explicit QTextImageHandler(QObject *parent = nullptr);
virtual QSizeF intrinsicSize(QTextDocument *doc, int posInDocument, const QTextFormat &format) override;
virtual void drawObject(QPainter *p, const QRectF &rect, QTextDocument *doc, int posInDocument, const QTextFormat &format) override;
diff --git a/src/gui/text/qtextobject_p.h b/src/gui/text/qtextobject_p.h
index 81ab023cc3..87c83868da 100644
--- a/src/gui/text/qtextobject_p.h
+++ b/src/gui/text/qtextobject_p.h
@@ -93,7 +93,7 @@ class QTextFramePrivate : public QTextObjectPrivate
Q_DECLARE_PUBLIC(QTextFrame)
public:
QTextFramePrivate(QTextDocument *doc)
- : QTextObjectPrivate(doc), fragment_start(0), fragment_end(0), parentFrame(0), layoutData(0)
+ : QTextObjectPrivate(doc), fragment_start(0), fragment_end(0), parentFrame(nullptr), layoutData(nullptr)
{
}
virtual void fragmentAdded(QChar type, uint fragment);
diff --git a/src/gui/text/qtexttable_p.h b/src/gui/text/qtexttable_p.h
index c969e1d5bc..5c05611009 100644
--- a/src/gui/text/qtexttable_p.h
+++ b/src/gui/text/qtexttable_p.h
@@ -61,7 +61,7 @@ class QTextTablePrivate : public QTextFramePrivate
{
Q_DECLARE_PUBLIC(QTextTable)
public:
- QTextTablePrivate(QTextDocument *document) : QTextFramePrivate(document), grid(0), nRows(0), nCols(0), dirty(true), blockFragmentUpdates(false) {}
+ QTextTablePrivate(QTextDocument *document) : QTextFramePrivate(document), grid(nullptr), nRows(0), nCols(0), dirty(true), blockFragmentUpdates(false) {}
~QTextTablePrivate();
static QTextTable *createTable(QTextDocumentPrivate *, int pos, int rows, int cols, const QTextTableFormat &tableFormat);
diff --git a/src/gui/util/qgridlayoutengine_p.h b/src/gui/util/qgridlayoutengine_p.h
index 5f0cc5da73..5f0e84edb1 100644
--- a/src/gui/util/qgridlayoutengine_p.h
+++ b/src/gui/util/qgridlayoutengine_p.h
@@ -180,7 +180,7 @@ public:
t = &q_minimumAscent;
break;
default:
- t = 0;
+ t = nullptr;
break;
}
return *t;
@@ -205,7 +205,7 @@ public:
t = &q_minimumAscent;
break;
default:
- t = 0;
+ t = nullptr;
break;
}
return *t;
@@ -276,7 +276,7 @@ class Q_GUI_EXPORT QGridLayoutItem
{
public:
QGridLayoutItem(int row, int column, int rowSpan = 1, int columnSpan = 1,
- Qt::Alignment alignment = 0);
+ Qt::Alignment alignment = nullptr);
virtual ~QGridLayoutItem() {}
inline int firstRow() const { return q_firstRows[Ver]; }
@@ -339,7 +339,7 @@ private:
class Q_GUI_EXPORT QGridLayoutEngine
{
public:
- QGridLayoutEngine(Qt::Alignment defaultAlignment = Qt::Alignment(0), bool snapToPixelGrid = false);
+ QGridLayoutEngine(Qt::Alignment defaultAlignment = Qt::Alignment(nullptr), bool snapToPixelGrid = false);
inline ~QGridLayoutEngine() { qDeleteAll(q_items); }
int rowCount(Qt::Orientation orientation) const;
diff --git a/src/gui/vulkan/qvulkanwindow_p.h b/src/gui/vulkan/qvulkanwindow_p.h
index c6a772bc31..fb374a5564 100644
--- a/src/gui/vulkan/qvulkanwindow_p.h
+++ b/src/gui/vulkan/qvulkanwindow_p.h
@@ -97,7 +97,7 @@ public:
int physDevIndex = 0;
QVector<VkPhysicalDevice> physDevs;
QVector<VkPhysicalDeviceProperties> physDevProps;
- QVulkanWindow::Flags flags = 0;
+ QVulkanWindow::Flags flags = nullptr;
QByteArrayList requestedDevExtensions;
QHash<VkPhysicalDevice, QVulkanInfoVector<QVulkanExtension> > supportedDevExtensions;
QVector<VkFormat> requestedColorFormats;
diff --git a/src/network/access/qftp_p.h b/src/network/access/qftp_p.h
index 0516c3d1f9..91d78d1351 100644
--- a/src/network/access/qftp_p.h
+++ b/src/network/access/qftp_p.h
@@ -67,7 +67,7 @@ class Q_AUTOTEST_EXPORT QFtp : public QObject
Q_OBJECT
public:
- explicit QFtp(QObject *parent = 0);
+ explicit QFtp(QObject *parent = nullptr);
virtual ~QFtp();
enum State {
@@ -118,7 +118,7 @@ public:
int setTransferMode(TransferMode mode);
int list(const QString &dir = QString());
int cd(const QString &dir);
- int get(const QString &file, QIODevice *dev=0, TransferType type = Binary);
+ int get(const QString &file, QIODevice *dev=nullptr, TransferType type = Binary);
int put(const QByteArray &data, const QString &file, TransferType type = Binary);
int put(QIODevice *dev, const QString &file, TransferType type = Binary);
int remove(const QString &file);
diff --git a/src/network/access/qhttpmultipart_p.h b/src/network/access/qhttpmultipart_p.h
index 363e0b346c..ead1eadf3b 100644
--- a/src/network/access/qhttpmultipart_p.h
+++ b/src/network/access/qhttpmultipart_p.h
@@ -64,7 +64,7 @@ QT_BEGIN_NAMESPACE
class QHttpPartPrivate: public QSharedData, public QNetworkHeadersPrivate
{
public:
- inline QHttpPartPrivate() : bodyDevice(0), headerCreated(false), readPointer(0)
+ inline QHttpPartPrivate() : bodyDevice(nullptr), headerCreated(false), readPointer(0)
{
}
~QHttpPartPrivate()
diff --git a/src/network/access/qhttpnetworkconnection_p.h b/src/network/access/qhttpnetworkconnection_p.h
index 2bd727e0af..2f3c334248 100644
--- a/src/network/access/qhttpnetworkconnection_p.h
+++ b/src/network/access/qhttpnetworkconnection_p.h
@@ -101,10 +101,10 @@ public:
#ifndef QT_NO_BEARERMANAGEMENT
explicit QHttpNetworkConnection(const QString &hostName, quint16 port = 80, bool encrypt = false,
ConnectionType connectionType = ConnectionTypeHTTP,
- QObject *parent = 0, QSharedPointer<QNetworkSession> networkSession
+ QObject *parent = nullptr, QSharedPointer<QNetworkSession> networkSession
= QSharedPointer<QNetworkSession>());
QHttpNetworkConnection(quint16 channelCount, const QString &hostName, quint16 port = 80,
- bool encrypt = false, QObject *parent = 0,
+ bool encrypt = false, QObject *parent = nullptr,
QSharedPointer<QNetworkSession> networkSession = QSharedPointer<QNetworkSession>(),
ConnectionType connectionType = ConnectionTypeHTTP);
#else
diff --git a/src/network/access/qhttpnetworkreply_p.h b/src/network/access/qhttpnetworkreply_p.h
index 863e21ea3e..12cfe359aa 100644
--- a/src/network/access/qhttpnetworkreply_p.h
+++ b/src/network/access/qhttpnetworkreply_p.h
@@ -89,7 +89,7 @@ class Q_AUTOTEST_EXPORT QHttpNetworkReply : public QObject, public QHttpNetworkH
Q_OBJECT
public:
- explicit QHttpNetworkReply(const QUrl &url = QUrl(), QObject *parent = 0);
+ explicit QHttpNetworkReply(const QUrl &url = QUrl(), QObject *parent = nullptr);
virtual ~QHttpNetworkReply();
QUrl url() const override;
diff --git a/src/network/access/qhttpthreaddelegate_p.h b/src/network/access/qhttpthreaddelegate_p.h
index 019a8b8b74..6184b39b30 100644
--- a/src/network/access/qhttpthreaddelegate_p.h
+++ b/src/network/access/qhttpthreaddelegate_p.h
@@ -82,7 +82,7 @@ class QHttpThreadDelegate : public QObject
{
Q_OBJECT
public:
- explicit QHttpThreadDelegate(QObject *parent = 0);
+ explicit QHttpThreadDelegate(QObject *parent = nullptr);
~QHttpThreadDelegate();
@@ -207,7 +207,7 @@ public:
: QNonContiguousByteDevice(),
wantDataPending(false),
m_amount(0),
- m_data(0),
+ m_data(nullptr),
m_atEnd(aE),
m_size(s),
m_pos(0)
@@ -240,12 +240,12 @@ public:
// Do nothing, we already sent a wantData signal and wait for results
len = 0;
}
- return 0;
+ return nullptr;
}
bool advanceReadPointer(qint64 a) override
{
- if (m_data == 0)
+ if (m_data == nullptr)
return false;
m_amount -= a;
@@ -269,7 +269,7 @@ public:
bool reset() override
{
m_amount = 0;
- m_data = 0;
+ m_data = nullptr;
m_dataArray.clear();
if (wantDataPending) {
diff --git a/src/network/access/qnetworkaccessauthenticationmanager_p.h b/src/network/access/qnetworkaccessauthenticationmanager_p.h
index 548675728f..31111ca2a5 100644
--- a/src/network/access/qnetworkaccessauthenticationmanager_p.h
+++ b/src/network/access/qnetworkaccessauthenticationmanager_p.h
@@ -90,12 +90,12 @@ public:
void cacheCredentials(const QUrl &url, const QAuthenticator *auth);
QNetworkAuthenticationCredential fetchCachedCredentials(const QUrl &url,
- const QAuthenticator *auth = 0);
+ const QAuthenticator *auth = nullptr);
#ifndef QT_NO_NETWORKPROXY
void cacheProxyCredentials(const QNetworkProxy &proxy, const QAuthenticator *auth);
QNetworkAuthenticationCredential fetchCachedProxyCredentials(const QNetworkProxy &proxy,
- const QAuthenticator *auth = 0);
+ const QAuthenticator *auth = nullptr);
#endif
void clearCache();
diff --git a/src/network/access/qnetworkdiskcache_p.h b/src/network/access/qnetworkdiskcache_p.h
index f7988e7dda..c797e63830 100644
--- a/src/network/access/qnetworkdiskcache_p.h
+++ b/src/network/access/qnetworkdiskcache_p.h
@@ -67,7 +67,7 @@ class QFile;
class QCacheItem
{
public:
- QCacheItem() : file(0)
+ QCacheItem() : file(nullptr)
{
}
~QCacheItem()
@@ -85,7 +85,7 @@ public:
metaData = QNetworkCacheMetaData();
data.close();
delete file;
- file = 0;
+ file = nullptr;
}
void writeHeader(QFile *device) const;
void writeCompressedData(QFile *device) const;
diff --git a/src/network/access/qnetworkreplyimpl_p.h b/src/network/access/qnetworkreplyimpl_p.h
index f4e8284ab6..4881e84e9c 100644
--- a/src/network/access/qnetworkreplyimpl_p.h
+++ b/src/network/access/qnetworkreplyimpl_p.h
@@ -74,7 +74,7 @@ class QNetworkReplyImpl: public QNetworkReply
{
Q_OBJECT
public:
- QNetworkReplyImpl(QObject *parent = 0);
+ QNetworkReplyImpl(QObject *parent = nullptr);
~QNetworkReplyImpl();
virtual void abort() override;
diff --git a/src/network/bearer/qbearerengine_p.h b/src/network/bearer/qbearerengine_p.h
index 5fc2578a78..a5a020a857 100644
--- a/src/network/bearer/qbearerengine_p.h
+++ b/src/network/bearer/qbearerengine_p.h
@@ -77,7 +77,7 @@ class Q_NETWORK_EXPORT QBearerEngine : public QObject
friend class QNetworkConfigurationManagerPrivate;
public:
- explicit QBearerEngine(QObject *parent = 0);
+ explicit QBearerEngine(QObject *parent = nullptr);
virtual ~QBearerEngine();
virtual bool hasIdentifier(const QString &id) = 0;
diff --git a/src/network/bearer/qbearerplugin_p.h b/src/network/bearer/qbearerplugin_p.h
index 0cdde3c06c..ac787d0541 100644
--- a/src/network/bearer/qbearerplugin_p.h
+++ b/src/network/bearer/qbearerplugin_p.h
@@ -68,7 +68,7 @@ class Q_NETWORK_EXPORT QBearerEnginePlugin : public QObject
{
Q_OBJECT
public:
- explicit QBearerEnginePlugin(QObject *parent = 0);
+ explicit QBearerEnginePlugin(QObject *parent = nullptr);
virtual ~QBearerEnginePlugin();
virtual QBearerEngine *create(const QString &key) const = 0;
diff --git a/src/network/kernel/qdnslookup_p.h b/src/network/kernel/qdnslookup_p.h
index 2dc98e527a..8c3c2ed3e1 100644
--- a/src/network/kernel/qdnslookup_p.h
+++ b/src/network/kernel/qdnslookup_p.h
@@ -95,7 +95,7 @@ public:
QDnsLookupPrivate()
: isFinished(false)
, type(QDnsLookup::A)
- , runnable(0)
+ , runnable(nullptr)
{ }
void _q_lookupFinished(const QDnsLookupReply &reply);
diff --git a/src/network/kernel/qhostinfo_p.h b/src/network/kernel/qhostinfo_p.h
index 8cce302166..da02163ddf 100644
--- a/src/network/kernel/qhostinfo_p.h
+++ b/src/network/kernel/qhostinfo_p.h
@@ -101,7 +101,7 @@ public Q_SLOTS:
{
if (slotObj) {
QHostInfo copy = info;
- void *args[2] = { 0, reinterpret_cast<void *>(&copy) };
+ void *args[2] = { nullptr, reinterpret_cast<void *>(&copy) };
slotObj->call(const_cast<QObject*>(receiver.data()), args);
slotObj->destroyIfLastRef();
} else {
diff --git a/src/network/kernel/qnetworkinterface_p.h b/src/network/kernel/qnetworkinterface_p.h
index 87a46b75fa..44e27a7e34 100644
--- a/src/network/kernel/qnetworkinterface_p.h
+++ b/src/network/kernel/qnetworkinterface_p.h
@@ -82,7 +82,7 @@ public:
class QNetworkInterfacePrivate: public QSharedData
{
public:
- QNetworkInterfacePrivate() : index(0), flags(0)
+ QNetworkInterfacePrivate() : index(0), flags(nullptr)
{ }
~QNetworkInterfacePrivate()
{ }
diff --git a/src/network/kernel/qnetworkinterface_unix_p.h b/src/network/kernel/qnetworkinterface_unix_p.h
index c085194e3c..553af5a303 100644
--- a/src/network/kernel/qnetworkinterface_unix_p.h
+++ b/src/network/kernel/qnetworkinterface_unix_p.h
@@ -80,7 +80,7 @@ QT_BEGIN_NAMESPACE
static QNetworkInterface::InterfaceFlags convertFlags(uint rawFlags)
{
- QNetworkInterface::InterfaceFlags flags = 0;
+ QNetworkInterface::InterfaceFlags flags = nullptr;
flags |= (rawFlags & IFF_UP) ? QNetworkInterface::IsUp : QNetworkInterface::InterfaceFlag(0);
flags |= (rawFlags & IFF_RUNNING) ? QNetworkInterface::IsRunning : QNetworkInterface::InterfaceFlag(0);
flags |= (rawFlags & IFF_BROADCAST) ? QNetworkInterface::CanBroadcast : QNetworkInterface::InterfaceFlag(0);
diff --git a/src/network/socket/qabstractsocketengine_p.h b/src/network/socket/qabstractsocketengine_p.h
index 8eebb06a4d..112e7032d6 100644
--- a/src/network/socket/qabstractsocketengine_p.h
+++ b/src/network/socket/qabstractsocketengine_p.h
@@ -88,7 +88,7 @@ public:
static QAbstractSocketEngine *createSocketEngine(QAbstractSocket::SocketType socketType, const QNetworkProxy &, QObject *parent);
static QAbstractSocketEngine *createSocketEngine(qintptr socketDescriptor, QObject *parent);
- QAbstractSocketEngine(QObject *parent = 0);
+ QAbstractSocketEngine(QObject *parent = nullptr);
enum SocketOption {
NonBlockingSocketOption,
@@ -155,7 +155,7 @@ public:
virtual qint64 pendingDatagramSize() const = 0;
#endif // QT_NO_UDPSOCKET
- virtual qint64 readDatagram(char *data, qint64 maxlen, QIpPacketHeader *header = 0,
+ virtual qint64 readDatagram(char *data, qint64 maxlen, QIpPacketHeader *header = nullptr,
PacketHeaderOptions = WantNone) = 0;
virtual qint64 writeDatagram(const char *data, qint64 len, const QIpPacketHeader &header) = 0;
virtual qint64 bytesToWrite() const = 0;
@@ -163,11 +163,11 @@ public:
virtual int option(SocketOption option) const = 0;
virtual bool setOption(SocketOption option, int value) = 0;
- virtual bool waitForRead(int msecs = 30000, bool *timedOut = 0) = 0;
- virtual bool waitForWrite(int msecs = 30000, bool *timedOut = 0) = 0;
+ virtual bool waitForRead(int msecs = 30000, bool *timedOut = nullptr) = 0;
+ virtual bool waitForWrite(int msecs = 30000, bool *timedOut = nullptr) = 0;
virtual bool waitForReadOrWrite(bool *readyToRead, bool *readyToWrite,
bool checkRead, bool checkWrite,
- int msecs = 30000, bool *timedOut = 0) = 0;
+ int msecs = 30000, bool *timedOut = nullptr) = 0;
QAbstractSocket::SocketError error() const;
QString errorString() const;
@@ -202,7 +202,7 @@ public Q_SLOTS:
public:
void setReceiver(QAbstractSocketEngineReceiver *receiver);
protected:
- QAbstractSocketEngine(QAbstractSocketEnginePrivate &dd, QObject* parent = 0);
+ QAbstractSocketEngine(QAbstractSocketEnginePrivate &dd, QObject* parent = nullptr);
void setError(QAbstractSocket::SocketError error, const QString &errorString) const;
void setState(QAbstractSocket::SocketState state);
diff --git a/src/network/socket/qhttpsocketengine_p.h b/src/network/socket/qhttpsocketengine_p.h
index bbcc09eee9..0c2c450c81 100644
--- a/src/network/socket/qhttpsocketengine_p.h
+++ b/src/network/socket/qhttpsocketengine_p.h
@@ -79,7 +79,7 @@ public:
ReadResponseContent,
ReadResponseHeader
};
- QHttpSocketEngine(QObject *parent = 0);
+ QHttpSocketEngine(QObject *parent = nullptr);
~QHttpSocketEngine();
bool initialize(QAbstractSocket::SocketType type, QAbstractSocket::NetworkLayerProtocol protocol = QAbstractSocket::IPv4Protocol) override;
@@ -126,11 +126,11 @@ public:
int option(SocketOption option) const override;
bool setOption(SocketOption option, int value) override;
- bool waitForRead(int msecs = 30000, bool *timedOut = 0) override;
- bool waitForWrite(int msecs = 30000, bool *timedOut = 0) override;
+ bool waitForRead(int msecs = 30000, bool *timedOut = nullptr) override;
+ bool waitForWrite(int msecs = 30000, bool *timedOut = nullptr) override;
bool waitForReadOrWrite(bool *readyToRead, bool *readyToWrite,
bool checkRead, bool checkWrite,
- int msecs = 30000, bool *timedOut = 0) override;
+ int msecs = 30000, bool *timedOut = nullptr) override;
bool isReadNotificationEnabled() const override;
void setReadNotificationEnabled(bool enable) override;
diff --git a/src/network/socket/qlocalserver_p.h b/src/network/socket/qlocalserver_p.h
index 2c073908cb..92616e59ce 100644
--- a/src/network/socket/qlocalserver_p.h
+++ b/src/network/socket/qlocalserver_p.h
@@ -78,7 +78,7 @@ class QLocalServerPrivate : public QObjectPrivate
public:
QLocalServerPrivate() :
#if !defined(QT_LOCALSOCKET_TCP) && !defined(Q_OS_WIN)
- listenSocket(-1), socketNotifier(0),
+ listenSocket(-1), socketNotifier(nullptr),
#endif
maxPendingConnections(30), error(QAbstractSocket::UnknownSocketError),
socketOptions(QLocalServer::NoOptions)
diff --git a/src/network/socket/qnativesocketengine_p.h b/src/network/socket/qnativesocketengine_p.h
index 2292566265..e5f0701d14 100644
--- a/src/network/socket/qnativesocketengine_p.h
+++ b/src/network/socket/qnativesocketengine_p.h
@@ -125,7 +125,7 @@ class Q_AUTOTEST_EXPORT QNativeSocketEngine : public QAbstractSocketEngine
{
Q_OBJECT
public:
- QNativeSocketEngine(QObject *parent = 0);
+ QNativeSocketEngine(QObject *parent = nullptr);
~QNativeSocketEngine();
bool initialize(QAbstractSocket::SocketType type, QAbstractSocket::NetworkLayerProtocol protocol = QAbstractSocket::IPv4Protocol) override;
@@ -161,7 +161,7 @@ public:
qint64 pendingDatagramSize() const override;
#endif // QT_NO_UDPSOCKET
- qint64 readDatagram(char *data, qint64 maxlen, QIpPacketHeader * = 0,
+ qint64 readDatagram(char *data, qint64 maxlen, QIpPacketHeader * = nullptr,
PacketHeaderOptions = WantNone) override;
qint64 writeDatagram(const char *data, qint64 len, const QIpPacketHeader &) override;
qint64 bytesToWrite() const override;
@@ -177,11 +177,11 @@ public:
int option(SocketOption option) const override;
bool setOption(SocketOption option, int value) override;
- bool waitForRead(int msecs = 30000, bool *timedOut = 0) override;
- bool waitForWrite(int msecs = 30000, bool *timedOut = 0) override;
+ bool waitForRead(int msecs = 30000, bool *timedOut = nullptr) override;
+ bool waitForWrite(int msecs = 30000, bool *timedOut = nullptr) override;
bool waitForReadOrWrite(bool *readyToRead, bool *readyToWrite,
bool checkRead, bool checkWrite,
- int msecs = 30000, bool *timedOut = 0) override;
+ int msecs = 30000, bool *timedOut = nullptr) override;
bool isReadNotificationEnabled() const override;
void setReadNotificationEnabled(bool enable) override;
diff --git a/src/network/socket/qsocks5socketengine_p.h b/src/network/socket/qsocks5socketengine_p.h
index ef9d771753..c256987e2d 100644
--- a/src/network/socket/qsocks5socketengine_p.h
+++ b/src/network/socket/qsocks5socketengine_p.h
@@ -65,7 +65,7 @@ class Q_AUTOTEST_EXPORT QSocks5SocketEngine : public QAbstractSocketEngine
{
Q_OBJECT
public:
- QSocks5SocketEngine(QObject *parent = 0);
+ QSocks5SocketEngine(QObject *parent = nullptr);
~QSocks5SocketEngine();
bool initialize(QAbstractSocket::SocketType type, QAbstractSocket::NetworkLayerProtocol protocol = QAbstractSocket::IPv4Protocol) override;
@@ -104,7 +104,7 @@ public:
qint64 pendingDatagramSize() const override;
#endif // QT_NO_UDPSOCKET
- qint64 readDatagram(char *data, qint64 maxlen, QIpPacketHeader * = 0,
+ qint64 readDatagram(char *data, qint64 maxlen, QIpPacketHeader * = nullptr,
PacketHeaderOptions = WantNone) override;
qint64 writeDatagram(const char *data, qint64 len, const QIpPacketHeader &) override;
qint64 bytesToWrite() const override;
@@ -112,11 +112,11 @@ public:
int option(SocketOption option) const override;
bool setOption(SocketOption option, int value) override;
- bool waitForRead(int msecs = 30000, bool *timedOut = 0) override;
- bool waitForWrite(int msecs = 30000, bool *timedOut = 0) override;
+ bool waitForRead(int msecs = 30000, bool *timedOut = nullptr) override;
+ bool waitForWrite(int msecs = 30000, bool *timedOut = nullptr) override;
bool waitForReadOrWrite(bool *readyToRead, bool *readyToWrite,
bool checkRead, bool checkWrite,
- int msecs = 30000, bool *timedOut = 0) override;
+ int msecs = 30000, bool *timedOut = nullptr) override;
bool isReadNotificationEnabled() const override;
void setReadNotificationEnabled(bool enable) override;
diff --git a/src/network/ssl/qasn1element_p.h b/src/network/ssl/qasn1element_p.h
index 22948e3ca5..020b5aa1af 100644
--- a/src/network/ssl/qasn1element_p.h
+++ b/src/network/ssl/qasn1element_p.h
@@ -156,10 +156,10 @@ public:
static QAsn1Element fromVector(const QVector<QAsn1Element> &items);
static QAsn1Element fromObjectId(const QByteArray &id);
- bool toBool(bool *ok = 0) const;
+ bool toBool(bool *ok = nullptr) const;
QDateTime toDateTime() const;
QMultiMap<QByteArray, QString> toInfo() const;
- qint64 toInteger(bool *ok = 0) const;
+ qint64 toInteger(bool *ok = nullptr) const;
QVector<QAsn1Element> toVector() const;
QByteArray toObjectId() const;
QByteArray toObjectName() const;
diff --git a/src/network/ssl/qsslcertificate_p.h b/src/network/ssl/qsslcertificate_p.h
index 4b331d4c4e..234cd45ceb 100644
--- a/src/network/ssl/qsslcertificate_p.h
+++ b/src/network/ssl/qsslcertificate_p.h
@@ -87,7 +87,7 @@ class QSslCertificatePrivate
{
public:
QSslCertificatePrivate()
- : null(true), x509(0)
+ : null(true), x509(nullptr)
{
#ifndef QT_NO_SSL
QSslSocketPrivate::ensureInitialized();
diff --git a/src/network/ssl/qsslcontext_openssl_p.h b/src/network/ssl/qsslcontext_openssl_p.h
index 48beebf134..1fa27279c7 100644
--- a/src/network/ssl/qsslcontext_openssl_p.h
+++ b/src/network/ssl/qsslcontext_openssl_p.h
@@ -89,7 +89,7 @@ public:
#if OPENSSL_VERSION_NUMBER >= 0x1000100fL && !defined(OPENSSL_NO_NEXTPROTONEG)
// must be public because we want to use it from an OpenSSL callback
struct NPNContext {
- NPNContext() : data(0),
+ NPNContext() : data(nullptr),
len(0),
status(QSslConfiguration::NextProtocolNegotiationNone)
{ }
diff --git a/src/network/ssl/qsslkey_p.h b/src/network/ssl/qsslkey_p.h
index 1f2b59904a..dd1a31b0e5 100644
--- a/src/network/ssl/qsslkey_p.h
+++ b/src/network/ssl/qsslkey_p.h
@@ -68,7 +68,7 @@ class QSslKeyPrivate
public:
inline QSslKeyPrivate()
: algorithm(QSsl::Opaque)
- , opaque(0)
+ , opaque(nullptr)
{
clear(false);
}
diff --git a/src/opengl/gl2paintengineex/qglengineshadermanager_p.h b/src/opengl/gl2paintengineex/qglengineshadermanager_p.h
index ec472da2e8..d23b3ad550 100644
--- a/src/opengl/gl2paintengineex/qglengineshadermanager_p.h
+++ b/src/opengl/gl2paintengineex/qglengineshadermanager_p.h
@@ -372,7 +372,7 @@ private:
class QGLEngineShaderProg
{
public:
- QGLEngineShaderProg() : program(0) {}
+ QGLEngineShaderProg() : program(nullptr) {}
~QGLEngineShaderProg() {
if (program)
diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h b/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h
index abf5b8ea48..762aac2f65 100644
--- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h
+++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h
@@ -175,9 +175,9 @@ public:
QGL2PaintEngineExPrivate(QGL2PaintEngineEx *q_ptr) :
q(q_ptr),
- shaderManager(0),
+ shaderManager(nullptr),
width(0), height(0),
- ctx(0),
+ ctx(nullptr),
useSystemClip(true),
elementIndicesVBOId(0),
opacityArray(0),
diff --git a/src/opengl/gl2paintengineex/qtextureglyphcache_gl_p.h b/src/opengl/gl2paintengineex/qtextureglyphcache_gl_p.h
index e76216ef5d..7c12ce8998 100644
--- a/src/opengl/gl2paintengineex/qtextureglyphcache_gl_p.h
+++ b/src/opengl/gl2paintengineex/qtextureglyphcache_gl_p.h
@@ -139,7 +139,7 @@ public:
inline void setPaintEnginePrivate(QGL2PaintEngineExPrivate *p) { pex = p; }
- inline const QOpenGLContextGroup *contextGroup() const { return m_textureResource ? m_textureResource->group() : 0; }
+ inline const QOpenGLContextGroup *contextGroup() const { return m_textureResource ? m_textureResource->group() : nullptr; }
inline int serialNumber() const { return m_serialNumber; }
diff --git a/src/opengl/qgl_p.h b/src/opengl/qgl_p.h
index ed364283cc..4e52c0f5e9 100644
--- a/src/opengl/qgl_p.h
+++ b/src/opengl/qgl_p.h
@@ -203,7 +203,7 @@ const QGLContext *qt_gl_transfer_context(const QGLContext *);
class QGLTemporaryContextPrivate;
class QGLTemporaryContext {
public:
- explicit QGLTemporaryContext(bool directRendering = true, QWidget *parent = 0);
+ explicit QGLTemporaryContext(bool directRendering = true, QWidget *parent = nullptr);
~QGLTemporaryContext();
private:
@@ -302,7 +302,7 @@ class Q_OPENGL_EXPORT QGLShareContextScope
{
public:
QGLShareContextScope(const QGLContext *ctx)
- : m_oldContext(0)
+ : m_oldContext(nullptr)
{
QGLContext *currentContext = const_cast<QGLContext *>(QGLContext::currentContext());
if (currentContext != ctx && !QGLContext::areSharing(ctx, currentContext)) {
@@ -367,7 +367,7 @@ Q_SIGNALS:
class QGLTexture {
public:
- explicit QGLTexture(QGLContext *ctx = 0, GLuint tx_id = 0, GLenum tx_target = GL_TEXTURE_2D,
+ explicit QGLTexture(QGLContext *ctx = nullptr, GLuint tx_id = 0, GLenum tx_target = GL_TEXTURE_2D,
QGLContext::BindOptions opt = QGLContext::DefaultBindOption)
: context(ctx),
id(tx_id),
@@ -378,7 +378,7 @@ public:
~QGLTexture() {
if (options & QGLContext::MemoryManagedBindOption) {
Q_ASSERT(context);
- QPlatformPixmap *boundPixmap = 0;
+ QPlatformPixmap *boundPixmap = nullptr;
context->d_ptr->texture_destroyer->emitFreeTexture(context, boundPixmap, id);
}
}
@@ -392,9 +392,9 @@ public:
bool canBindCompressedTexture
(const char *buf, int len, const char *format, bool *hasAlpha);
QSize bindCompressedTexture
- (const QString& fileName, const char *format = 0);
+ (const QString& fileName, const char *format = nullptr);
QSize bindCompressedTexture
- (const char *buf, int len, const char *format = 0);
+ (const char *buf, int len, const char *format = nullptr);
QSize bindCompressedTextureDDS(const char *buf, int len);
QSize bindCompressedTexturePVR(const char *buf, int len);
};
diff --git a/src/opengl/qglframebufferobject_p.h b/src/opengl/qglframebufferobject_p.h
index bf5e21cf0b..9d536527c3 100644
--- a/src/opengl/qglframebufferobject_p.h
+++ b/src/opengl/qglframebufferobject_p.h
@@ -124,9 +124,9 @@ private:
class QGLFramebufferObjectPrivate
{
public:
- QGLFramebufferObjectPrivate() : fbo_guard(0), texture_guard(0), depth_buffer_guard(0)
- , stencil_buffer_guard(0), color_buffer_guard(0)
- , valid(false), engine(0) {}
+ QGLFramebufferObjectPrivate() : fbo_guard(nullptr), texture_guard(nullptr), depth_buffer_guard(nullptr)
+ , stencil_buffer_guard(nullptr), color_buffer_guard(nullptr)
+ , valid(false), engine(nullptr) {}
~QGLFramebufferObjectPrivate() {}
void init(QGLFramebufferObject *q, const QSize& sz,
diff --git a/src/opengl/qglpixelbuffer_p.h b/src/opengl/qglpixelbuffer_p.h
index 9125fcfb4b..2729ade2b6 100644
--- a/src/opengl/qglpixelbuffer_p.h
+++ b/src/opengl/qglpixelbuffer_p.h
@@ -77,7 +77,7 @@ private:
class QGLPixelBufferPrivate {
Q_DECLARE_PUBLIC(QGLPixelBuffer)
public:
- QGLPixelBufferPrivate(QGLPixelBuffer *q) : q_ptr(q), invalid(true), qctx(0), widget(0), fbo(0), blit_fbo(0), pbuf(0), ctx(0)
+ QGLPixelBufferPrivate(QGLPixelBuffer *q) : q_ptr(q), invalid(true), qctx(nullptr), widget(nullptr), fbo(nullptr), blit_fbo(nullptr), pbuf(nullptr), ctx(nullptr)
{
}
bool init(const QSize &size, const QGLFormat &f, QGLWidget *shareWidget);
diff --git a/src/opengl/qgraphicsshadereffect_p.h b/src/opengl/qgraphicsshadereffect_p.h
index 1a32f24d70..218caa2936 100644
--- a/src/opengl/qgraphicsshadereffect_p.h
+++ b/src/opengl/qgraphicsshadereffect_p.h
@@ -67,7 +67,7 @@ class Q_OPENGL_EXPORT QGraphicsShaderEffect : public QGraphicsEffect
{
Q_OBJECT
public:
- QGraphicsShaderEffect(QObject *parent = 0);
+ QGraphicsShaderEffect(QObject *parent = nullptr);
virtual ~QGraphicsShaderEffect();
QByteArray pixelShaderFragment() const;
diff --git a/src/platformheaders/nativecontexts/qeglnativecontext.h b/src/platformheaders/nativecontexts/qeglnativecontext.h
index d4a0e998da..5af2b304fe 100644
--- a/src/platformheaders/nativecontexts/qeglnativecontext.h
+++ b/src/platformheaders/nativecontexts/qeglnativecontext.h
@@ -54,8 +54,8 @@ typedef int EGLDisplay;
struct QEGLNativeContext
{
QEGLNativeContext()
- : m_context(0),
- m_display(0)
+ : m_context(nullptr),
+ m_display(nullptr)
{ }
QEGLNativeContext(EGLContext ctx, EGLDisplay dpy)
diff --git a/src/platformsupport/devicediscovery/qdevicediscovery_p.h b/src/platformsupport/devicediscovery/qdevicediscovery_p.h
index b1ce14b5c3..f1f50e9708 100644
--- a/src/platformsupport/devicediscovery/qdevicediscovery_p.h
+++ b/src/platformsupport/devicediscovery/qdevicediscovery_p.h
@@ -86,7 +86,7 @@ public:
Q_ENUM(QDeviceType)
Q_DECLARE_FLAGS(QDeviceTypes, QDeviceType)
- static QDeviceDiscovery *create(QDeviceTypes type, QObject *parent = 0);
+ static QDeviceDiscovery *create(QDeviceTypes type, QObject *parent = nullptr);
virtual QStringList scanConnectedDevices() = 0;
diff --git a/src/platformsupport/devicediscovery/qdevicediscovery_udev_p.h b/src/platformsupport/devicediscovery/qdevicediscovery_udev_p.h
index 28618d0b21..82b475776d 100644
--- a/src/platformsupport/devicediscovery/qdevicediscovery_udev_p.h
+++ b/src/platformsupport/devicediscovery/qdevicediscovery_udev_p.h
@@ -61,7 +61,7 @@ class QDeviceDiscoveryUDev : public QDeviceDiscovery
Q_OBJECT
public:
- QDeviceDiscoveryUDev(QDeviceTypes types, struct udev *udev, QObject *parent = 0);
+ QDeviceDiscoveryUDev(QDeviceTypes types, struct udev *udev, QObject *parent = nullptr);
~QDeviceDiscoveryUDev();
QStringList scanConnectedDevices() override;
diff --git a/src/platformsupport/eglconvenience/qeglpbuffer_p.h b/src/platformsupport/eglconvenience/qeglpbuffer_p.h
index 0285e067a6..8ad2eb7248 100644
--- a/src/platformsupport/eglconvenience/qeglpbuffer_p.h
+++ b/src/platformsupport/eglconvenience/qeglpbuffer_p.h
@@ -60,7 +60,7 @@ class QEGLPbuffer : public QPlatformOffscreenSurface
{
public:
QEGLPbuffer(EGLDisplay display, const QSurfaceFormat &format, QOffscreenSurface *offscreenSurface,
- QEGLPlatformContext::Flags flags = 0);
+ QEGLPlatformContext::Flags flags = nullptr);
~QEGLPbuffer();
QSurfaceFormat format() const override { return m_format; }
diff --git a/src/platformsupport/eglconvenience/qeglplatformcontext_p.h b/src/platformsupport/eglconvenience/qeglplatformcontext_p.h
index d6cbbe4131..ed77c57df5 100644
--- a/src/platformsupport/eglconvenience/qeglplatformcontext_p.h
+++ b/src/platformsupport/eglconvenience/qeglplatformcontext_p.h
@@ -68,8 +68,8 @@ public:
Q_DECLARE_FLAGS(Flags, Flag)
QEGLPlatformContext(const QSurfaceFormat &format, QPlatformOpenGLContext *share, EGLDisplay display,
- EGLConfig *config = 0, const QVariant &nativeHandle = QVariant(),
- Flags flags = 0);
+ EGLConfig *config = nullptr, const QVariant &nativeHandle = QVariant(),
+ Flags flags = nullptr);
~QEGLPlatformContext();
void initialize() override;
diff --git a/src/platformsupport/eventdispatchers/qeventdispatcher_glib_p.h b/src/platformsupport/eventdispatchers/qeventdispatcher_glib_p.h
index 085a1c52f3..b9254d3071 100644
--- a/src/platformsupport/eventdispatchers/qeventdispatcher_glib_p.h
+++ b/src/platformsupport/eventdispatchers/qeventdispatcher_glib_p.h
@@ -64,7 +64,7 @@ class QPAEventDispatcherGlib : public QEventDispatcherGlib
Q_DECLARE_PRIVATE(QPAEventDispatcherGlib)
public:
- explicit QPAEventDispatcherGlib(QObject *parent = 0);
+ explicit QPAEventDispatcherGlib(QObject *parent = nullptr);
~QPAEventDispatcherGlib();
bool processEvents(QEventLoop::ProcessEventsFlags flags) override;
@@ -77,7 +77,7 @@ class QPAEventDispatcherGlibPrivate : public QEventDispatcherGlibPrivate
{
Q_DECLARE_PUBLIC(QPAEventDispatcherGlib)
public:
- QPAEventDispatcherGlibPrivate(GMainContext *context = 0);
+ QPAEventDispatcherGlibPrivate(GMainContext *context = nullptr);
GUserEventSource *userEventSource;
};
diff --git a/src/platformsupport/eventdispatchers/qunixeventdispatcher_qpa_p.h b/src/platformsupport/eventdispatchers/qunixeventdispatcher_qpa_p.h
index 7f775b73ee..8157b8793d 100644
--- a/src/platformsupport/eventdispatchers/qunixeventdispatcher_qpa_p.h
+++ b/src/platformsupport/eventdispatchers/qunixeventdispatcher_qpa_p.h
@@ -61,7 +61,7 @@ class QUnixEventDispatcherQPA : public QEventDispatcherUNIX
Q_OBJECT
public:
- explicit QUnixEventDispatcherQPA(QObject *parent = 0);
+ explicit QUnixEventDispatcherQPA(QObject *parent = nullptr);
~QUnixEventDispatcherQPA();
bool processEvents(QEventLoop::ProcessEventsFlags flags);
diff --git a/src/platformsupport/fbconvenience/qfbvthandler_p.h b/src/platformsupport/fbconvenience/qfbvthandler_p.h
index 17d07317b2..d565ec3632 100644
--- a/src/platformsupport/fbconvenience/qfbvthandler_p.h
+++ b/src/platformsupport/fbconvenience/qfbvthandler_p.h
@@ -63,7 +63,7 @@ class QFbVtHandler : public QObject
Q_OBJECT
public:
- QFbVtHandler(QObject *parent = 0);
+ QFbVtHandler(QObject *parent = nullptr);
~QFbVtHandler();
signals:
diff --git a/src/platformsupport/fontdatabases/freetype/qfontengine_ft_p.h b/src/platformsupport/fontdatabases/freetype/qfontengine_ft_p.h
index d498b0ac8b..2d1d5e6572 100644
--- a/src/platformsupport/fontdatabases/freetype/qfontengine_ft_p.h
+++ b/src/platformsupport/fontdatabases/freetype/qfontengine_ft_p.h
@@ -268,7 +268,7 @@ private:
inline bool isScalableBitmap() const { return freetype->isScalableBitmap(); }
inline Glyph *loadGlyph(uint glyph, QFixed subPixelPosition, GlyphFormat format = Format_None, bool fetchMetricsOnly = false, bool disableOutlineDrawing = false) const
- { return loadGlyph(cacheEnabled ? &defaultGlyphSet : 0, glyph, subPixelPosition, format, fetchMetricsOnly, disableOutlineDrawing); }
+ { return loadGlyph(cacheEnabled ? &defaultGlyphSet : nullptr, glyph, subPixelPosition, format, fetchMetricsOnly, disableOutlineDrawing); }
Glyph *loadGlyph(QGlyphSet *set, uint glyph, QFixed subPixelPosition, GlyphFormat = Format_None, bool fetchMetricsOnly = false, bool disableOutlineDrawing = false) const;
Glyph *loadGlyphFor(glyph_t g, QFixed subPixelPosition, GlyphFormat format, const QTransform &t, bool fetchBoundingBox = false, bool disableOutlineDrawing = false);
diff --git a/src/platformsupport/input/evdevkeyboard/qevdevkeyboardmanager_p.h b/src/platformsupport/input/evdevkeyboard/qevdevkeyboardmanager_p.h
index 326e438a7c..01b7e9fc0e 100644
--- a/src/platformsupport/input/evdevkeyboard/qevdevkeyboardmanager_p.h
+++ b/src/platformsupport/input/evdevkeyboard/qevdevkeyboardmanager_p.h
@@ -64,7 +64,7 @@ QT_BEGIN_NAMESPACE
class QEvdevKeyboardManager : public QObject
{
public:
- QEvdevKeyboardManager(const QString &key, const QString &specification, QObject *parent = 0);
+ QEvdevKeyboardManager(const QString &key, const QString &specification, QObject *parent = nullptr);
~QEvdevKeyboardManager();
void loadKeymap(const QString &file);
diff --git a/src/platformsupport/input/evdevmouse/qevdevmousemanager_p.h b/src/platformsupport/input/evdevmouse/qevdevmousemanager_p.h
index 13a8e3dec5..c63ca29a71 100644
--- a/src/platformsupport/input/evdevmouse/qevdevmousemanager_p.h
+++ b/src/platformsupport/input/evdevmouse/qevdevmousemanager_p.h
@@ -65,7 +65,7 @@ class QDeviceDiscovery;
class QEvdevMouseManager : public QObject
{
public:
- QEvdevMouseManager(const QString &key, const QString &specification, QObject *parent = 0);
+ QEvdevMouseManager(const QString &key, const QString &specification, QObject *parent = nullptr);
~QEvdevMouseManager();
void handleMouseEvent(int x, int y, bool abs, Qt::MouseButtons buttons,
diff --git a/src/platformsupport/input/evdevtablet/qevdevtablethandler_p.h b/src/platformsupport/input/evdevtablet/qevdevtablethandler_p.h
index 66e821117a..b83bb21258 100644
--- a/src/platformsupport/input/evdevtablet/qevdevtablethandler_p.h
+++ b/src/platformsupport/input/evdevtablet/qevdevtablethandler_p.h
@@ -64,7 +64,7 @@ class QEvdevTabletData;
class QEvdevTabletHandler : public QObject
{
public:
- explicit QEvdevTabletHandler(const QString &device, const QString &spec = QString(), QObject *parent = 0);
+ explicit QEvdevTabletHandler(const QString &device, const QString &spec = QString(), QObject *parent = nullptr);
~QEvdevTabletHandler();
qint64 deviceId() const;
@@ -83,7 +83,7 @@ private:
class QEvdevTabletHandlerThread : public QDaemonThread
{
public:
- explicit QEvdevTabletHandlerThread(const QString &device, const QString &spec, QObject *parent = 0);
+ explicit QEvdevTabletHandlerThread(const QString &device, const QString &spec, QObject *parent = nullptr);
~QEvdevTabletHandlerThread();
void run() override;
QEvdevTabletHandler *handler() { return m_handler; }
diff --git a/src/platformsupport/input/evdevtablet/qevdevtabletmanager_p.h b/src/platformsupport/input/evdevtablet/qevdevtabletmanager_p.h
index cde91c55aa..b598156e52 100644
--- a/src/platformsupport/input/evdevtablet/qevdevtabletmanager_p.h
+++ b/src/platformsupport/input/evdevtablet/qevdevtabletmanager_p.h
@@ -63,7 +63,7 @@ class QEvdevTabletHandlerThread;
class QEvdevTabletManager : public QObject
{
public:
- QEvdevTabletManager(const QString &key, const QString &spec, QObject *parent = 0);
+ QEvdevTabletManager(const QString &key, const QString &spec, QObject *parent = nullptr);
~QEvdevTabletManager();
void addDevice(const QString &deviceNode);
diff --git a/src/platformsupport/input/evdevtouch/qevdevtouchmanager_p.h b/src/platformsupport/input/evdevtouch/qevdevtouchmanager_p.h
index e524c516f1..b9b772fb3a 100644
--- a/src/platformsupport/input/evdevtouch/qevdevtouchmanager_p.h
+++ b/src/platformsupport/input/evdevtouch/qevdevtouchmanager_p.h
@@ -63,7 +63,7 @@ class QEvdevTouchScreenHandlerThread;
class QEvdevTouchManager : public QObject
{
public:
- QEvdevTouchManager(const QString &key, const QString &spec, QObject *parent = 0);
+ QEvdevTouchManager(const QString &key, const QString &spec, QObject *parent = nullptr);
~QEvdevTouchManager();
void addDevice(const QString &deviceNode);
diff --git a/src/platformsupport/input/libinput/qlibinputtouch_p.h b/src/platformsupport/input/libinput/qlibinputtouch_p.h
index 6f88001d19..51304e6a21 100644
--- a/src/platformsupport/input/libinput/qlibinputtouch_p.h
+++ b/src/platformsupport/input/libinput/qlibinputtouch_p.h
@@ -73,7 +73,7 @@ public:
private:
struct DeviceState {
- DeviceState() : m_touchDevice(0) { }
+ DeviceState() : m_touchDevice(nullptr) { }
QWindowSystemInterface::TouchPoint *point(int32_t slot);
QList<QWindowSystemInterface::TouchPoint> m_points;
QTouchDevice *m_touchDevice;
diff --git a/src/platformsupport/linuxaccessibility/atspiadaptor_p.h b/src/platformsupport/linuxaccessibility/atspiadaptor_p.h
index b5704f53ad..0b624389a3 100644
--- a/src/platformsupport/linuxaccessibility/atspiadaptor_p.h
+++ b/src/platformsupport/linuxaccessibility/atspiadaptor_p.h
@@ -76,7 +76,7 @@ class AtSpiAdaptor :public QDBusVirtualObject
Q_OBJECT
public:
- explicit AtSpiAdaptor(DBusConnection *connection, QObject *parent = 0);
+ explicit AtSpiAdaptor(DBusConnection *connection, QObject *parent = nullptr);
~AtSpiAdaptor();
void registerApplication();
diff --git a/src/platformsupport/linuxaccessibility/cache_p.h b/src/platformsupport/linuxaccessibility/cache_p.h
index e8529b779b..cc55acc6f8 100644
--- a/src/platformsupport/linuxaccessibility/cache_p.h
+++ b/src/platformsupport/linuxaccessibility/cache_p.h
@@ -65,7 +65,7 @@ class QSpiDBusCache : public QObject
Q_OBJECT
public:
- explicit QSpiDBusCache(QDBusConnection c, QObject* parent = 0);
+ explicit QSpiDBusCache(QDBusConnection c, QObject* parent = nullptr);
void emitAddAccessible(const QSpiAccessibleCacheItem& item);
void emitRemoveAccessible(const QSpiObjectReference& item);
diff --git a/src/platformsupport/linuxaccessibility/dbusconnection_p.h b/src/platformsupport/linuxaccessibility/dbusconnection_p.h
index 4030fabc22..860c18ca05 100644
--- a/src/platformsupport/linuxaccessibility/dbusconnection_p.h
+++ b/src/platformsupport/linuxaccessibility/dbusconnection_p.h
@@ -65,7 +65,7 @@ class DBusConnection : public QObject
Q_OBJECT
public:
- DBusConnection(QObject *parent = 0);
+ DBusConnection(QObject *parent = nullptr);
QDBusConnection connection() const;
bool isEnabled() const { return m_enabled; }
diff --git a/src/platformsupport/themes/genericunix/dbusmenu/qdbusmenuconnection_p.h b/src/platformsupport/themes/genericunix/dbusmenu/qdbusmenuconnection_p.h
index c7c3f4bc5b..565af6c947 100644
--- a/src/platformsupport/themes/genericunix/dbusmenu/qdbusmenuconnection_p.h
+++ b/src/platformsupport/themes/genericunix/dbusmenu/qdbusmenuconnection_p.h
@@ -67,7 +67,7 @@ class QDBusMenuConnection : public QObject
Q_OBJECT
public:
- QDBusMenuConnection(QObject *parent = 0, const QString &serviceName = QString());
+ QDBusMenuConnection(QObject *parent = nullptr, const QString &serviceName = QString());
QDBusConnection connection() const { return m_connection; }
QDBusServiceWatcher *dbusWatcher() const { return m_dbusWatcher; }
bool isStatusNotifierHostRegistered() const { return m_statusNotifierHostRegistered; }
diff --git a/src/platformsupport/themes/genericunix/dbustray/qxdgnotificationproxy_p.h b/src/platformsupport/themes/genericunix/dbustray/qxdgnotificationproxy_p.h
index 352b4aa5d6..ab99ea65dd 100644
--- a/src/platformsupport/themes/genericunix/dbustray/qxdgnotificationproxy_p.h
+++ b/src/platformsupport/themes/genericunix/dbustray/qxdgnotificationproxy_p.h
@@ -88,7 +88,7 @@ public:
public:
QXdgNotificationInterface(const QString &service, const QString &path,
- const QDBusConnection &connection, QObject *parent = 0);
+ const QDBusConnection &connection, QObject *parent = nullptr);
~QXdgNotificationInterface();
diff --git a/src/platformsupport/themes/genericunix/qgenericunixthemes_p.h b/src/platformsupport/themes/genericunix/qgenericunixthemes_p.h
index a5963b79ea..c0da9d8370 100644
--- a/src/platformsupport/themes/genericunix/qgenericunixthemes_p.h
+++ b/src/platformsupport/themes/genericunix/qgenericunixthemes_p.h
@@ -109,7 +109,7 @@ public:
QVariant themeHint(ThemeHint hint) const override;
QIcon fileIcon(const QFileInfo &fileInfo,
- QPlatformTheme::IconOptions iconOptions = 0) const override;
+ QPlatformTheme::IconOptions iconOptions = nullptr) const override;
const QPalette *palette(Palette type = SystemPalette) const override;
@@ -134,7 +134,7 @@ public:
QGnomeTheme();
QVariant themeHint(ThemeHint hint) const override;
QIcon fileIcon(const QFileInfo &fileInfo,
- QPlatformTheme::IconOptions = 0) const override;
+ QPlatformTheme::IconOptions = nullptr) const override;
const QFont *font(Font type) const override;
QString standardButtonText(int button) const override;
diff --git a/src/plugins/bearer/connman/qconnmanengine.h b/src/plugins/bearer/connman/qconnmanengine.h
index c9ff17f801..ef80d38fa2 100644
--- a/src/plugins/bearer/connman/qconnmanengine.h
+++ b/src/plugins/bearer/connman/qconnmanengine.h
@@ -68,7 +68,7 @@ class QConnmanEngine : public QBearerEngineImpl
Q_OBJECT
public:
- QConnmanEngine(QObject *parent = 0);
+ QConnmanEngine(QObject *parent = nullptr);
~QConnmanEngine();
bool connmanAvailable() const;
diff --git a/src/plugins/bearer/connman/qconnmanservice_linux_p.h b/src/plugins/bearer/connman/qconnmanservice_linux_p.h
index d2804ebca6..790325f9a1 100644
--- a/src/plugins/bearer/connman/qconnmanservice_linux_p.h
+++ b/src/plugins/bearer/connman/qconnmanservice_linux_p.h
@@ -105,7 +105,7 @@ class QConnmanManagerInterface : public QDBusAbstractInterface
public:
- QConnmanManagerInterface( QObject *parent = 0);
+ QConnmanManagerInterface( QObject *parent = nullptr);
~QConnmanManagerInterface();
QDBusObjectPath path() const;
@@ -155,7 +155,7 @@ class QConnmanServiceInterface : public QDBusAbstractInterface
public:
- explicit QConnmanServiceInterface(const QString &dbusPathName,QObject *parent = 0);
+ explicit QConnmanServiceInterface(const QString &dbusPathName,QObject *parent = nullptr);
~QConnmanServiceInterface();
QVariantMap getProperties();
@@ -202,7 +202,7 @@ class QConnmanTechnologyInterface : public QDBusAbstractInterface
public:
- explicit QConnmanTechnologyInterface(const QString &dbusPathName,QObject *parent = 0);
+ explicit QConnmanTechnologyInterface(const QString &dbusPathName,QObject *parent = nullptr);
~QConnmanTechnologyInterface();
QString type();
diff --git a/src/plugins/bearer/generic/qgenericengine.h b/src/plugins/bearer/generic/qgenericengine.h
index 08960d66f6..79c71ca7a3 100644
--- a/src/plugins/bearer/generic/qgenericengine.h
+++ b/src/plugins/bearer/generic/qgenericengine.h
@@ -55,7 +55,7 @@ class QGenericEngine : public QBearerEngineImpl
Q_OBJECT
public:
- QGenericEngine(QObject *parent = 0);
+ QGenericEngine(QObject *parent = nullptr);
~QGenericEngine();
QString getInterfaceFromId(const QString &id) override;
diff --git a/src/plugins/bearer/linux_common/qofonoservice_linux_p.h b/src/plugins/bearer/linux_common/qofonoservice_linux_p.h
index 35614a20f2..62df5d4fa7 100644
--- a/src/plugins/bearer/linux_common/qofonoservice_linux_p.h
+++ b/src/plugins/bearer/linux_common/qofonoservice_linux_p.h
@@ -100,7 +100,7 @@ class QOfonoManagerInterface : public QDBusAbstractInterface
public:
- QOfonoManagerInterface( QObject *parent = 0);
+ QOfonoManagerInterface( QObject *parent = nullptr);
~QOfonoManagerInterface();
QStringList getModems();
@@ -120,7 +120,7 @@ class QOfonoModemInterface : public QDBusAbstractInterface
public:
- explicit QOfonoModemInterface(const QString &dbusModemPathName, QObject *parent = 0);
+ explicit QOfonoModemInterface(const QString &dbusModemPathName, QObject *parent = nullptr);
~QOfonoModemInterface();
bool isPowered();
@@ -140,7 +140,7 @@ class QOfonoNetworkRegistrationInterface : public QDBusAbstractInterface
public:
- explicit QOfonoNetworkRegistrationInterface(const QString &dbusModemPathName, QObject *parent = 0);
+ explicit QOfonoNetworkRegistrationInterface(const QString &dbusModemPathName, QObject *parent = nullptr);
~QOfonoNetworkRegistrationInterface();
QString getTechnology();
@@ -159,7 +159,7 @@ class QOfonoDataConnectionManagerInterface : public QDBusAbstractInterface
public:
- explicit QOfonoDataConnectionManagerInterface(const QString &dbusPathName, QObject *parent = 0);
+ explicit QOfonoDataConnectionManagerInterface(const QString &dbusPathName, QObject *parent = nullptr);
~QOfonoDataConnectionManagerInterface();
QStringList contexts();
@@ -184,7 +184,7 @@ class QOfonoConnectionContextInterface : public QDBusAbstractInterface
public:
- explicit QOfonoConnectionContextInterface(const QString &dbusPathName, QObject *parent = 0);
+ explicit QOfonoConnectionContextInterface(const QString &dbusPathName, QObject *parent = nullptr);
~QOfonoConnectionContextInterface();
QVariant getProperty(const QString &);
diff --git a/src/plugins/bearer/networkmanager/qnetworkmanagerengine.h b/src/plugins/bearer/networkmanager/qnetworkmanagerengine.h
index 74fe24b5ab..a95c68abdf 100644
--- a/src/plugins/bearer/networkmanager/qnetworkmanagerengine.h
+++ b/src/plugins/bearer/networkmanager/qnetworkmanagerengine.h
@@ -69,7 +69,7 @@ class QNetworkManagerEngine : public QBearerEngineImpl
Q_OBJECT
public:
- QNetworkManagerEngine(QObject *parent = 0);
+ QNetworkManagerEngine(QObject *parent = nullptr);
~QNetworkManagerEngine();
bool networkManagerAvailable() const;
@@ -99,7 +99,7 @@ private Q_SLOTS:
void interfacePropertiesChanged(const QMap<QString, QVariant> &properties);
void activeConnectionPropertiesChanged(const QMap<QString, QVariant> &properties);
- void newConnection(const QDBusObjectPath &path, QNetworkManagerSettings *settings = 0);
+ void newConnection(const QDBusObjectPath &path, QNetworkManagerSettings *settings = nullptr);
void removeConnection(const QString &path);
void updateConnection();
void activationFinished(QDBusPendingCallWatcher *watcher);
diff --git a/src/plugins/bearer/networkmanager/qnetworkmanagerservice.h b/src/plugins/bearer/networkmanager/qnetworkmanagerservice.h
index c879083faf..bff7a71097 100644
--- a/src/plugins/bearer/networkmanager/qnetworkmanagerservice.h
+++ b/src/plugins/bearer/networkmanager/qnetworkmanagerservice.h
@@ -152,7 +152,7 @@ public:
NM_STATE_CONNECTED_GLOBAL = 70
} NMState;
- QNetworkManagerInterface(QObject *parent = 0);
+ QNetworkManagerInterface(QObject *parent = nullptr);
~QNetworkManagerInterface();
QList <QDBusObjectPath> getDevices();
@@ -228,7 +228,7 @@ public:
Q_DECLARE_FLAGS(ApSecurityFlags, ApSecurityFlag)
- explicit QNetworkManagerInterfaceAccessPoint(const QString &dbusPathName, QObject *parent = 0);
+ explicit QNetworkManagerInterfaceAccessPoint(const QString &dbusPathName, QObject *parent = nullptr);
~QNetworkManagerInterfaceAccessPoint();
quint32 flags() const;
@@ -259,7 +259,7 @@ class QNetworkManagerInterfaceDevice : public QDBusAbstractInterface
public:
- explicit QNetworkManagerInterfaceDevice(const QString &deviceObjectPath, QObject *parent = 0);
+ explicit QNetworkManagerInterfaceDevice(const QString &deviceObjectPath, QObject *parent = nullptr);
~QNetworkManagerInterfaceDevice();
QString udi() const;
@@ -288,7 +288,7 @@ class QNetworkManagerInterfaceDeviceWired : public QDBusAbstractInterface
public:
explicit QNetworkManagerInterfaceDeviceWired(const QString &ifaceDevicePath,
- QObject *parent = 0);
+ QObject *parent = nullptr);
~QNetworkManagerInterfaceDeviceWired();
QString hwAddress() const;
@@ -325,7 +325,7 @@ public:
};
explicit QNetworkManagerInterfaceDeviceWireless(const QString &ifaceDevicePath,
- QObject *parent = 0);
+ QObject *parent = nullptr);
~QNetworkManagerInterfaceDeviceWireless();
QList <QDBusObjectPath> getAccessPoints();
@@ -367,7 +367,7 @@ public:
Q_DECLARE_FLAGS(ModemCapabilities, ModemCapability)
explicit QNetworkManagerInterfaceDeviceModem(const QString &ifaceDevicePath,
- QObject *parent = 0);
+ QObject *parent = nullptr);
~QNetworkManagerInterfaceDeviceModem();
ModemCapabilities modemCapabilities() const;
@@ -392,7 +392,7 @@ class QNetworkManagerSettings : public QDBusAbstractInterface
public:
- explicit QNetworkManagerSettings(const QString &settingsService, QObject *parent = 0);
+ explicit QNetworkManagerSettings(const QString &settingsService, QObject *parent = nullptr);
~QNetworkManagerSettings();
QList <QDBusObjectPath> listConnections();
@@ -413,7 +413,7 @@ class QNetworkManagerSettingsConnection : public QDBusAbstractInterface
public:
- QNetworkManagerSettingsConnection(const QString &settingsService, const QString &connectionObjectPath, QObject *parent = 0);
+ QNetworkManagerSettingsConnection(const QString &settingsService, const QString &connectionObjectPath, QObject *parent = nullptr);
~QNetworkManagerSettingsConnection();
QNmSettingsMap getSettings();
@@ -451,7 +451,7 @@ public:
Activated = 2
};
- explicit QNetworkManagerConnectionActive(const QString &dbusPathName, QObject *parent = 0);
+ explicit QNetworkManagerConnectionActive(const QString &dbusPathName, QObject *parent = nullptr);
~ QNetworkManagerConnectionActive();
QDBusObjectPath connection() const;
@@ -478,7 +478,7 @@ class QNetworkManagerIp4Config : public QDBusAbstractInterface
Q_OBJECT
public:
- explicit QNetworkManagerIp4Config(const QString &dbusPathName, QObject *parent = 0);
+ explicit QNetworkManagerIp4Config(const QString &dbusPathName, QObject *parent = nullptr);
~QNetworkManagerIp4Config();
QStringList domains() const;
@@ -489,7 +489,7 @@ class PropertiesDBusInterface : public QDBusAbstractInterface
public:
PropertiesDBusInterface(const QString &service, const QString &path,
const QString &interface, const QDBusConnection &connection,
- QObject *parent = 0)
+ QObject *parent = nullptr)
: QDBusAbstractInterface(service, path, interface.toLatin1().data(), connection, parent)
{}
};
diff --git a/src/plugins/bearer/qbearerengine_impl.h b/src/plugins/bearer/qbearerengine_impl.h
index 3f8a4d821d..5c003aaaf6 100644
--- a/src/plugins/bearer/qbearerengine_impl.h
+++ b/src/plugins/bearer/qbearerengine_impl.h
@@ -56,7 +56,7 @@ public:
DisconnectionError,
};
- QBearerEngineImpl(QObject *parent = 0) : QBearerEngine(parent) {}
+ QBearerEngineImpl(QObject *parent = nullptr) : QBearerEngine(parent) {}
~QBearerEngineImpl() {}
virtual void connectToId(const QString &id) = 0;
diff --git a/src/plugins/bearer/qnetworksession_impl.h b/src/plugins/bearer/qnetworksession_impl.h
index d9aa6ca8fb..0f8e014900 100644
--- a/src/plugins/bearer/qnetworksession_impl.h
+++ b/src/plugins/bearer/qnetworksession_impl.h
@@ -66,7 +66,7 @@ class QNetworkSessionPrivateImpl : public QNetworkSessionPrivate
public:
QNetworkSessionPrivateImpl()
- : engine(0), startTime(0), lastError(QNetworkSession::UnknownSessionError), sessionTimeout(-1), currentPolicies(QNetworkSession::NoPolicy), opened(false)
+ : engine(nullptr), startTime(0), lastError(QNetworkSession::UnknownSessionError), sessionTimeout(-1), currentPolicies(QNetworkSession::NoPolicy), opened(false)
{}
~QNetworkSessionPrivateImpl()
{}
diff --git a/src/plugins/platforminputcontexts/ibus/qibusinputcontextproxy.h b/src/plugins/platforminputcontexts/ibus/qibusinputcontextproxy.h
index 47a40ab8c2..396a213aaa 100644
--- a/src/plugins/platforminputcontexts/ibus/qibusinputcontextproxy.h
+++ b/src/plugins/platforminputcontexts/ibus/qibusinputcontextproxy.h
@@ -31,7 +31,7 @@ public:
{ return "org.freedesktop.IBus.InputContext"; }
public:
- QIBusInputContextProxy(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = 0);
+ QIBusInputContextProxy(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = nullptr);
~QIBusInputContextProxy();
diff --git a/src/plugins/platforminputcontexts/ibus/qibusplatforminputcontext.h b/src/plugins/platforminputcontexts/ibus/qibusplatforminputcontext.h
index d4daea2eb3..8e7b8df120 100644
--- a/src/plugins/platforminputcontexts/ibus/qibusplatforminputcontext.h
+++ b/src/plugins/platforminputcontexts/ibus/qibusplatforminputcontext.h
@@ -59,9 +59,9 @@ class QIBusFilterEventWatcher: public QDBusPendingCallWatcher
{
public:
explicit QIBusFilterEventWatcher(const QDBusPendingCall &call,
- QObject *parent = 0,
- QWindow *window = 0,
- const Qt::KeyboardModifiers modifiers = 0,
+ QObject *parent = nullptr,
+ QWindow *window = nullptr,
+ const Qt::KeyboardModifiers modifiers = nullptr,
const QVariantList arguments = QVariantList())
: QDBusPendingCallWatcher(call, parent)
, m_window(window)
diff --git a/src/plugins/platforminputcontexts/ibus/qibusproxy.h b/src/plugins/platforminputcontexts/ibus/qibusproxy.h
index 839e972c34..c9876deebf 100644
--- a/src/plugins/platforminputcontexts/ibus/qibusproxy.h
+++ b/src/plugins/platforminputcontexts/ibus/qibusproxy.h
@@ -35,7 +35,7 @@ public:
{ return QStringLiteral("org.freedesktop.DBus.Properties"); }
public:
- QIBusProxy(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = 0);
+ QIBusProxy(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = nullptr);
~QIBusProxy();
diff --git a/src/plugins/platforms/vnc/qvnc_p.h b/src/plugins/platforms/vnc/qvnc_p.h
index 338fae9f87..f7f2f74ddb 100644
--- a/src/plugins/platforms/vnc/qvnc_p.h
+++ b/src/plugins/platforms/vnc/qvnc_p.h
@@ -139,7 +139,7 @@ public:
class QRfbServerInit
{
public:
- QRfbServerInit() { name = 0; }
+ QRfbServerInit() { name = nullptr; }
~QRfbServerInit() { delete[] name; }
int size() const { return QRfbPixelFormat::size() + 8 + strlen(name); }
diff --git a/src/plugins/platforms/vnc/qvncscreen.h b/src/plugins/platforms/vnc/qvncscreen.h
index e69aa90d41..db658d4ecc 100644
--- a/src/plugins/platforms/vnc/qvncscreen.h
+++ b/src/plugins/platforms/vnc/qvncscreen.h
@@ -82,12 +82,12 @@ public:
qreal dpiX = 96;
qreal dpiY = 96;
- QVncDirtyMap *dirty = 0;
+ QVncDirtyMap *dirty = nullptr;
QRegion dirtyRegion;
int refreshRate = 30;
- QVncServer *vncServer = 0;
+ QVncServer *vncServer = nullptr;
#if QT_CONFIG(cursor)
- QVncClientCursor *clientCursor = 0;
+ QVncClientCursor *clientCursor = nullptr;
#endif
};
diff --git a/src/plugins/platforms/xcb/gl_integrations/qxcbglintegrationplugin.h b/src/plugins/platforms/xcb/gl_integrations/qxcbglintegrationplugin.h
index d5a0af97b0..b18248570f 100644
--- a/src/plugins/platforms/xcb/gl_integrations/qxcbglintegrationplugin.h
+++ b/src/plugins/platforms/xcb/gl_integrations/qxcbglintegrationplugin.h
@@ -54,7 +54,7 @@ class Q_XCB_EXPORT QXcbGlIntegrationPlugin : public QObject
{
Q_OBJECT
public:
- explicit QXcbGlIntegrationPlugin(QObject *parent = 0)
+ explicit QXcbGlIntegrationPlugin(QObject *parent = nullptr)
: QObject(parent)
{ }
diff --git a/src/plugins/platforms/xcb/qxcbconnection.h b/src/plugins/platforms/xcb/qxcbconnection.h
index 0e3ecd135b..6747b237da 100644
--- a/src/plugins/platforms/xcb/qxcbconnection.h
+++ b/src/plugins/platforms/xcb/qxcbconnection.h
@@ -108,7 +108,7 @@ public:
virtual void handleXIMouseEvent(xcb_ge_event_t *, Qt::MouseEventSource = Qt::MouseEventNotSynthesized) {}
virtual void handleXIEnterLeave(xcb_ge_event_t *) {}
#endif
- virtual QXcbWindow *toWindow() { return 0; }
+ virtual QXcbWindow *toWindow() { return nullptr; }
};
typedef QHash<xcb_window_t, QXcbWindowEventListener *> WindowMapper;
@@ -364,7 +364,7 @@ private:
WindowMapper m_mapper;
- Qt::MouseButtons m_buttonState = 0;
+ Qt::MouseButtons m_buttonState = nullptr;
Qt::MouseButton m_button = Qt::NoButton;
QXcbWindow *m_focusWindow = nullptr;
diff --git a/src/plugins/platforms/xcb/qxcbcursor.h b/src/plugins/platforms/xcb/qxcbcursor.h
index 5bc806381c..488988cbe9 100644
--- a/src/plugins/platforms/xcb/qxcbcursor.h
+++ b/src/plugins/platforms/xcb/qxcbcursor.h
@@ -83,7 +83,7 @@ public:
QPoint pos() const override;
void setPos(const QPoint &pos) override;
- static void queryPointer(QXcbConnection *c, QXcbVirtualDesktop **virtualDesktop, QPoint *pos, int *keybMask = 0);
+ static void queryPointer(QXcbConnection *c, QXcbVirtualDesktop **virtualDesktop, QPoint *pos, int *keybMask = nullptr);
#ifndef QT_NO_CURSOR
xcb_cursor_t xcbCursor(const QCursor &c) const
diff --git a/src/plugins/platforms/xcb/qxcbdrag.h b/src/plugins/platforms/xcb/qxcbdrag.h
index c19008c04b..1388e68acc 100644
--- a/src/plugins/platforms/xcb/qxcbdrag.h
+++ b/src/plugins/platforms/xcb/qxcbdrag.h
@@ -86,7 +86,7 @@ public:
void handlePosition(QPlatformWindow *w, const xcb_client_message_event_t *event);
void handleLeave(QPlatformWindow *w, const xcb_client_message_event_t *event);
void handleDrop(QPlatformWindow *, const xcb_client_message_event_t *event,
- Qt::MouseButtons b = 0, Qt::KeyboardModifiers mods = 0);
+ Qt::MouseButtons b = nullptr, Qt::KeyboardModifiers mods = nullptr);
void handleStatus(const xcb_client_message_event_t *event);
void handleSelectionRequest(const xcb_selection_request_event_t *event);
@@ -109,7 +109,7 @@ private:
void init();
void handle_xdnd_position(QPlatformWindow *w, const xcb_client_message_event_t *event,
- Qt::MouseButtons b = 0, Qt::KeyboardModifiers mods = 0);
+ Qt::MouseButtons b = nullptr, Qt::KeyboardModifiers mods = nullptr);
void handle_xdnd_status(const xcb_client_message_event_t *event);
void send_leave();
diff --git a/src/plugins/platforms/xcb/qxcbobject.h b/src/plugins/platforms/xcb/qxcbobject.h
index 1b98d9346b..931bed9ec1 100644
--- a/src/plugins/platforms/xcb/qxcbobject.h
+++ b/src/plugins/platforms/xcb/qxcbobject.h
@@ -47,7 +47,7 @@ QT_BEGIN_NAMESPACE
class QXcbObject
{
public:
- QXcbObject(QXcbConnection *connection = 0) : m_connection(connection) {}
+ QXcbObject(QXcbConnection *connection = nullptr) : m_connection(connection) {}
void setConnection(QXcbConnection *connection) { m_connection = connection; }
QXcbConnection *connection() const { return m_connection; }
diff --git a/src/plugins/platforms/xcb/qxcbwindow.h b/src/plugins/platforms/xcb/qxcbwindow.h
index f98cd8a74d..e4a04f5308 100644
--- a/src/plugins/platforms/xcb/qxcbwindow.h
+++ b/src/plugins/platforms/xcb/qxcbwindow.h
@@ -166,7 +166,7 @@ public:
bool needsSync() const;
void postSyncWindowRequest();
- void clearSyncWindowRequest() { m_pendingSyncRequest = 0; }
+ void clearSyncWindowRequest() { m_pendingSyncRequest = nullptr; }
QXcbScreen *xcbScreen() const;
diff --git a/src/plugins/platformthemes/xdgdesktopportal/qxdgdesktopportaltheme.h b/src/plugins/platformthemes/xdgdesktopportal/qxdgdesktopportaltheme.h
index 3497c6a6f1..5cfc4df0d0 100644
--- a/src/plugins/platformthemes/xdgdesktopportal/qxdgdesktopportaltheme.h
+++ b/src/plugins/platformthemes/xdgdesktopportal/qxdgdesktopportaltheme.h
@@ -72,7 +72,7 @@ public:
QPixmap standardPixmap(StandardPixmap sp, const QSizeF &size) const override;
QIcon fileIcon(const QFileInfo &fileInfo,
- QPlatformTheme::IconOptions iconOptions = 0) const override;
+ QPlatformTheme::IconOptions iconOptions = nullptr) const override;
QIconEngine *createIconEngine(const QString &iconName) const override;
diff --git a/src/plugins/sqldrivers/odbc/qsql_odbc_p.h b/src/plugins/sqldrivers/odbc/qsql_odbc_p.h
index ea0aa6fc8b..ccd0206f38 100644
--- a/src/plugins/sqldrivers/odbc/qsql_odbc_p.h
+++ b/src/plugins/sqldrivers/odbc/qsql_odbc_p.h
@@ -89,8 +89,8 @@ class Q_EXPORT_SQLDRIVER_ODBC QODBCDriver : public QSqlDriver
friend class QODBCResultPrivate;
public:
- explicit QODBCDriver(QObject *parent=0);
- QODBCDriver(SQLHANDLE env, SQLHANDLE con, QObject * parent=0);
+ explicit QODBCDriver(QObject *parent=nullptr);
+ QODBCDriver(SQLHANDLE env, SQLHANDLE con, QObject * parent=nullptr);
virtual ~QODBCDriver();
bool hasFeature(DriverFeature f) const override;
void close() override;
diff --git a/src/plugins/sqldrivers/sqlite/qsql_sqlite_p.h b/src/plugins/sqldrivers/sqlite/qsql_sqlite_p.h
index 61be4c937f..c7952bca9a 100644
--- a/src/plugins/sqldrivers/sqlite/qsql_sqlite_p.h
+++ b/src/plugins/sqldrivers/sqlite/qsql_sqlite_p.h
@@ -72,8 +72,8 @@ class Q_EXPORT_SQLDRIVER_SQLITE QSQLiteDriver : public QSqlDriver
Q_OBJECT
friend class QSQLiteResultPrivate;
public:
- explicit QSQLiteDriver(QObject *parent = 0);
- explicit QSQLiteDriver(sqlite3 *connection, QObject *parent = 0);
+ explicit QSQLiteDriver(QObject *parent = nullptr);
+ explicit QSQLiteDriver(sqlite3 *connection, QObject *parent = nullptr);
~QSQLiteDriver();
bool hasFeature(DriverFeature f) const override;
bool open(const QString & db,
diff --git a/src/sql/models/qsqlquerymodel_p.h b/src/sql/models/qsqlquerymodel_p.h
index d5ca2f89cb..64e9aeb3db 100644
--- a/src/sql/models/qsqlquerymodel_p.h
+++ b/src/sql/models/qsqlquerymodel_p.h
@@ -75,7 +75,7 @@ public:
void initColOffsets(int size);
int columnInQuery(int modelColumn) const;
- mutable QSqlQuery query = { QSqlQuery(0) };
+ mutable QSqlQuery query = { QSqlQuery(nullptr) };
mutable QSqlError error;
QModelIndex bottom;
QSqlRecord rec;
diff --git a/src/sql/models/qsqltablemodel_p.h b/src/sql/models/qsqltablemodel_p.h
index bb568ab444..9ac34e7259 100644
--- a/src/sql/models/qsqltablemodel_p.h
+++ b/src/sql/models/qsqltablemodel_p.h
@@ -93,7 +93,7 @@ public:
QSqlTableModel::EditStrategy strategy;
bool busyInsertingRows;
- QSqlQuery editQuery = { QSqlQuery(0) };
+ QSqlQuery editQuery = { QSqlQuery(nullptr) };
QSqlIndex primaryIndex;
QString tableName;
QString filter;
diff --git a/src/testlib/qabstracttestlogger_p.h b/src/testlib/qabstracttestlogger_p.h
index a64e7ea96f..9bb1d1e80c 100644
--- a/src/testlib/qabstracttestlogger_p.h
+++ b/src/testlib/qabstracttestlogger_p.h
@@ -97,14 +97,14 @@ public:
virtual void enterTestData(QTestData *) {}
virtual void addIncident(IncidentTypes type, const char *description,
- const char *file = 0, int line = 0) = 0;
+ const char *file = nullptr, int line = 0) = 0;
virtual void addBenchmarkResult(const QBenchmarkResult &result) = 0;
virtual void addMessage(QtMsgType, const QMessageLogContext &,
const QString &);
virtual void addMessage(MessageTypes type, const QString &message,
- const char *file = 0, int line = 0) = 0;
+ const char *file = nullptr, int line = 0) = 0;
void outputString(const char *msg);
@@ -151,7 +151,7 @@ struct QTestCharBuffer
inline bool reset(int newSize)
{
- char *newBuf = 0;
+ char *newBuf = nullptr;
if (buf == staticBuf) {
// if we point to our internal buffer, we need to malloc first
newBuf = reinterpret_cast<char *>(malloc(newSize));
diff --git a/src/testlib/qcsvbenchmarklogger_p.h b/src/testlib/qcsvbenchmarklogger_p.h
index 5840aee0f5..83e465c859 100644
--- a/src/testlib/qcsvbenchmarklogger_p.h
+++ b/src/testlib/qcsvbenchmarklogger_p.h
@@ -68,11 +68,11 @@ public:
void leaveTestFunction() override;
void addIncident(IncidentTypes type, const char *description,
- const char *file = 0, int line = 0) override;
+ const char *file = nullptr, int line = 0) override;
void addBenchmarkResult(const QBenchmarkResult &result) override;
void addMessage(MessageTypes type, const QString &message,
- const char *file = 0, int line = 0) override;
+ const char *file = nullptr, int line = 0) override;
};
QT_END_NAMESPACE
diff --git a/src/testlib/qplaintestlogger_p.h b/src/testlib/qplaintestlogger_p.h
index 55755830b2..80ef4864c1 100644
--- a/src/testlib/qplaintestlogger_p.h
+++ b/src/testlib/qplaintestlogger_p.h
@@ -68,17 +68,17 @@ public:
void leaveTestFunction() override;
void addIncident(IncidentTypes type, const char *description,
- const char *file = 0, int line = 0) override;
+ const char *file = nullptr, int line = 0) override;
void addBenchmarkResult(const QBenchmarkResult &result) override;
void addMessage(QtMsgType, const QMessageLogContext &,
const QString &) override;
void addMessage(MessageTypes type, const QString &message,
- const char *file = 0, int line = 0) override;
+ const char *file = nullptr, int line = 0) override;
private:
- void printMessage(const char *type, const char *msg, const char *file = 0, int line = 0);
+ void printMessage(const char *type, const char *msg, const char *file = nullptr, int line = 0);
void outputMessage(const char *str);
void printBenchmarkResult(const QBenchmarkResult &result);
};
diff --git a/src/testlib/qsignalspy.h b/src/testlib/qsignalspy.h
index 218a26ec5c..0285080662 100644
--- a/src/testlib/qsignalspy.h
+++ b/src/testlib/qsignalspy.h
@@ -122,7 +122,7 @@ public:
}
if (!QMetaObject::connect(obj, sigIndex, this, memberOffset,
- Qt::DirectConnection, 0)) {
+ Qt::DirectConnection, nullptr)) {
qWarning("QSignalSpy: QMetaObject::connect returned false. Unable to connect.");
return;
}
diff --git a/src/testlib/qtaptestlogger_p.h b/src/testlib/qtaptestlogger_p.h
index b51343e4fe..967c724b51 100644
--- a/src/testlib/qtaptestlogger_p.h
+++ b/src/testlib/qtaptestlogger_p.h
@@ -70,9 +70,9 @@ public:
void enterTestData(QTestData *data) override;
void addIncident(IncidentTypes type, const char *description,
- const char *file = 0, int line = 0) override;
+ const char *file = nullptr, int line = 0) override;
void addMessage(MessageTypes type, const QString &message,
- const char *file = 0, int line = 0) override;
+ const char *file = nullptr, int line = 0) override;
void addBenchmarkResult(const QBenchmarkResult &) override {};
private:
diff --git a/src/testlib/qteamcitylogger_p.h b/src/testlib/qteamcitylogger_p.h
index 80f2454724..dd7c0cdcf0 100644
--- a/src/testlib/qteamcitylogger_p.h
+++ b/src/testlib/qteamcitylogger_p.h
@@ -70,11 +70,11 @@ public:
void leaveTestFunction() override;
void addIncident(IncidentTypes type, const char *description,
- const char *file = 0, int line = 0) override;
+ const char *file = nullptr, int line = 0) override;
void addBenchmarkResult(const QBenchmarkResult &result) override;
void addMessage(MessageTypes type, const QString &message,
- const char *file = 0, int line = 0) override;
+ const char *file = nullptr, int line = 0) override;
private:
QString currTestFuncName;
diff --git a/src/testlib/qtestcoreelement_p.h b/src/testlib/qtestcoreelement_p.h
index e79efdd87f..84406fed85 100644
--- a/src/testlib/qtestcoreelement_p.h
+++ b/src/testlib/qtestcoreelement_p.h
@@ -80,7 +80,7 @@ class QTestCoreElement: public QTestCoreList<ElementType>
template<class ElementType>
QTestCoreElement<ElementType>::QTestCoreElement(int t)
- :listOfAttributes(0), type(QTest::LogElementType(t))
+ :listOfAttributes(nullptr), type(QTest::LogElementType(t))
{
}
@@ -114,7 +114,7 @@ const char *QTestCoreElement<ElementType>::attributeValue(QTest::AttributeIndex
if (attrb)
return attrb->value();
- return 0;
+ return nullptr;
}
template <class ElementType>
@@ -124,7 +124,7 @@ const char *QTestCoreElement<ElementType>::attributeName(QTest::AttributeIndex i
if (attrb)
return attrb->name();
- return 0;
+ return nullptr;
}
template <class ElementType>
@@ -145,7 +145,7 @@ const char *QTestCoreElement<ElementType>::elementName() const
if (type != QTest::LET_Undefined)
return xmlElementNames[type];
- return 0;
+ return nullptr;
}
template <class ElementType>
@@ -165,7 +165,7 @@ const QTestElementAttribute *QTestCoreElement<ElementType>::attribute(QTest::Att
iterator = iterator->nextElement();
}
- return 0;
+ return nullptr;
}
QT_END_NAMESPACE
diff --git a/src/testlib/qtestcorelist_p.h b/src/testlib/qtestcorelist_p.h
index 4d080f6758..daeb293644 100644
--- a/src/testlib/qtestcorelist_p.h
+++ b/src/testlib/qtestcorelist_p.h
@@ -73,8 +73,8 @@ class QTestCoreList
template <class T>
QTestCoreList<T>::QTestCoreList()
- : next(0)
- , prev(0)
+ : next(nullptr)
+ , prev(nullptr)
{
}
@@ -82,12 +82,12 @@ template <class T>
QTestCoreList<T>::~QTestCoreList()
{
if (prev) {
- prev->next = 0;
+ prev->next = nullptr;
}
delete prev;
if (next) {
- next->prev = 0;
+ next->prev = nullptr;
}
delete next;
}
diff --git a/src/testlib/qxmltestlogger_p.h b/src/testlib/qxmltestlogger_p.h
index b85742f939..04ed57d587 100644
--- a/src/testlib/qxmltestlogger_p.h
+++ b/src/testlib/qxmltestlogger_p.h
@@ -71,11 +71,11 @@ public:
void leaveTestFunction() override;
void addIncident(IncidentTypes type, const char *description,
- const char *file = 0, int line = 0) override;
+ const char *file = nullptr, int line = 0) override;
void addBenchmarkResult(const QBenchmarkResult &result) override;
void addMessage(MessageTypes type, const QString &message,
- const char *file = 0, int line = 0) override;
+ const char *file = nullptr, int line = 0) override;
static int xmlCdata(QTestCharBuffer *dest, char const* src);
static int xmlQuote(QTestCharBuffer *dest, char const* src);
diff --git a/src/testlib/qxunittestlogger_p.h b/src/testlib/qxunittestlogger_p.h
index 8fb01fbe61..48f07ddcf2 100644
--- a/src/testlib/qxunittestlogger_p.h
+++ b/src/testlib/qxunittestlogger_p.h
@@ -71,12 +71,12 @@ class QXunitTestLogger : public QAbstractTestLogger
void leaveTestFunction() override;
void addIncident(IncidentTypes type, const char *description,
- const char *file = 0, int line = 0) override;
+ const char *file = nullptr, int line = 0) override;
void addBenchmarkResult(const QBenchmarkResult &result) override;
void addTag(QTestElement* element);
void addMessage(MessageTypes type, const QString &message,
- const char *file = 0, int line = 0) override;
+ const char *file = nullptr, int line = 0) override;
private:
QTestElement *listOfTestcases;
diff --git a/src/tools/moc/generator.h b/src/tools/moc/generator.h
index 134166580b..eae0353199 100644
--- a/src/tools/moc/generator.h
+++ b/src/tools/moc/generator.h
@@ -39,7 +39,7 @@ class Generator
ClassDef *cdef;
QVector<uint> meta_data;
public:
- Generator(ClassDef *classDef, const QVector<QByteArray> &metaTypes, const QHash<QByteArray, QByteArray> &knownQObjectClasses, const QHash<QByteArray, QByteArray> &knownGadgets, FILE *outfile = 0);
+ Generator(ClassDef *classDef, const QVector<QByteArray> &metaTypes, const QHash<QByteArray, QByteArray> &knownQObjectClasses, const QHash<QByteArray, QByteArray> &knownGadgets, FILE *outfile = nullptr);
void generateCode();
private:
bool registerableMetaType(const QByteArray &propertyType);
diff --git a/src/tools/moc/parser.h b/src/tools/moc/parser.h
index bedcbbf7e2..63f4cf0d9a 100644
--- a/src/tools/moc/parser.h
+++ b/src/tools/moc/parser.h
@@ -69,9 +69,9 @@ public:
inline const Symbol &symbol() { return symbols.at(index-1);}
Q_NORETURN void error(int rollback);
- Q_NORETURN void error(const char *msg = 0);
- void warning(const char * = 0);
- void note(const char * = 0);
+ Q_NORETURN void error(const char *msg = nullptr);
+ void warning(const char * = nullptr);
+ void note(const char * = nullptr);
};
diff --git a/src/tools/uic/driver.h b/src/tools/uic/driver.h
index 1303d0bf8a..69206e1608 100644
--- a/src/tools/uic/driver.h
+++ b/src/tools/uic/driver.h
@@ -56,8 +56,8 @@ public:
// tools
bool printDependencies(const QString &fileName);
- bool uic(const QString &fileName, QTextStream *output = 0);
- bool uic(const QString &fileName, DomUI *ui, QTextStream *output = 0);
+ bool uic(const QString &fileName, QTextStream *output = nullptr);
+ bool uic(const QString &fileName, DomUI *ui, QTextStream *output = nullptr);
// configuration
inline QTextStream &output() const { return *m_output; }
diff --git a/src/widgets/dialogs/qdialog_p.h b/src/widgets/dialogs/qdialog_p.h
index 92634f6793..77f9fae09a 100644
--- a/src/widgets/dialogs/qdialog_p.h
+++ b/src/widgets/dialogs/qdialog_p.h
@@ -75,15 +75,15 @@ public:
QDialogPrivate()
:
#if QT_CONFIG(pushbutton)
- mainDef(0),
+ mainDef(nullptr),
#endif
- orientation(Qt::Horizontal),extension(0), doShowExtension(false),
+ orientation(Qt::Horizontal),extension(nullptr), doShowExtension(false),
#if QT_CONFIG(sizegrip)
- resizer(0),
+ resizer(nullptr),
sizeGripEnabled(false),
#endif
- rescode(0), resetModalityTo(-1), wasModalitySet(true), eventLoop(0),
- nativeDialogInUse(false), m_platformHelper(0), m_platformHelperCreated(false)
+ rescode(0), resetModalityTo(-1), wasModalitySet(true), eventLoop(nullptr),
+ nativeDialogInUse(false), m_platformHelper(nullptr), m_platformHelperCreated(false)
{}
~QDialogPrivate();
diff --git a/src/widgets/dialogs/qfiledialog_p.h b/src/widgets/dialogs/qfiledialog_p.h
index 463c77aa23..7e53b61031 100644
--- a/src/widgets/dialogs/qfiledialog_p.h
+++ b/src/widgets/dialogs/qfiledialog_p.h
@@ -98,7 +98,7 @@ class QPlatformDialogHelper;
struct QFileDialogArgs
{
- QFileDialogArgs() : parent(0), mode(QFileDialog::AnyFile) {}
+ QFileDialogArgs() : parent(nullptr), mode(QFileDialog::AnyFile) {}
QWidget *parent;
QString caption;
@@ -292,7 +292,7 @@ private:
class QFileDialogLineEdit : public QLineEdit
{
public:
- QFileDialogLineEdit(QWidget *parent = 0) : QLineEdit(parent), d_ptr(0){}
+ QFileDialogLineEdit(QWidget *parent = nullptr) : QLineEdit(parent), d_ptr(nullptr){}
void setFileDialogPrivate(QFileDialogPrivate *d_pointer) {d_ptr = d_pointer; }
void keyPressEvent(QKeyEvent *e) override;
bool hideOnEsc;
@@ -303,7 +303,7 @@ private:
class QFileDialogComboBox : public QComboBox
{
public:
- QFileDialogComboBox(QWidget *parent = 0) : QComboBox(parent), urlModel(0) {}
+ QFileDialogComboBox(QWidget *parent = nullptr) : QComboBox(parent), urlModel(nullptr) {}
void setFileDialogPrivate(QFileDialogPrivate *d_pointer);
void showPopup() override;
void setHistory(const QStringList &paths);
@@ -319,7 +319,7 @@ private:
class QFileDialogListView : public QListView
{
public:
- QFileDialogListView(QWidget *parent = 0);
+ QFileDialogListView(QWidget *parent = nullptr);
void setFileDialogPrivate(QFileDialogPrivate *d_pointer);
QSize sizeHint() const override;
protected:
diff --git a/src/widgets/dialogs/qfileinfogatherer_p.h b/src/widgets/dialogs/qfileinfogatherer_p.h
index 134a14b7ce..795f60249f 100644
--- a/src/widgets/dialogs/qfileinfogatherer_p.h
+++ b/src/widgets/dialogs/qfileinfogatherer_p.h
@@ -166,7 +166,7 @@ Q_SIGNALS:
void directoryLoaded(const QString &path);
public:
- explicit QFileInfoGatherer(QObject *parent = 0);
+ explicit QFileInfoGatherer(QObject *parent = nullptr);
~QFileInfoGatherer();
#if QT_CONFIG(filesystemwatcher) && defined(Q_OS_WIN)
diff --git a/src/widgets/dialogs/qfilesystemmodel_p.h b/src/widgets/dialogs/qfilesystemmodel_p.h
index 9c432e1ae6..d8f9f2b076 100644
--- a/src/widgets/dialogs/qfilesystemmodel_p.h
+++ b/src/widgets/dialogs/qfilesystemmodel_p.h
@@ -99,13 +99,13 @@ public:
class QFileSystemNode
{
public:
- explicit QFileSystemNode(const QString &filename = QString(), QFileSystemNode *p = 0)
- : fileName(filename), populatedChildren(false), isVisible(false), dirtyChildrenIndex(-1), parent(p), info(0) {}
+ explicit QFileSystemNode(const QString &filename = QString(), QFileSystemNode *p = nullptr)
+ : fileName(filename), populatedChildren(false), isVisible(false), dirtyChildrenIndex(-1), parent(p), info(nullptr) {}
~QFileSystemNode() {
qDeleteAll(children);
delete info;
- info = 0;
- parent = 0;
+ info = nullptr;
+ parent = nullptr;
}
QString fileName;
@@ -116,7 +116,7 @@ public:
inline qint64 size() const { if (info && !info->isDir()) return info->size(); return 0; }
inline QString type() const { if (info) return info->displayType; return QLatin1String(""); }
inline QDateTime lastModified() const { if (info) return info->lastModified(); return QDateTime(); }
- inline QFile::Permissions permissions() const { if (info) return info->permissions(); return 0; }
+ inline QFile::Permissions permissions() const { if (info) return info->permissions(); return nullptr; }
inline bool isReadable() const { return ((permissions() & QFile::ReadUser) != 0); }
inline bool isWritable() const { return ((permissions() & QFile::WriteUser) != 0); }
inline bool isExecutable() const { return ((permissions() & QFile::ExeUser) != 0); }
@@ -162,7 +162,7 @@ public:
return info && (*info == fileInfo);
}
- inline bool hasInformation() const { return info != 0; }
+ inline bool hasInformation() const { return info != nullptr; }
void populate(const QExtendedInformation &fileInfo) {
if (!info)
diff --git a/src/widgets/dialogs/qfscompleter_p.h b/src/widgets/dialogs/qfscompleter_p.h
index 3b829d4a52..f5110a7622 100644
--- a/src/widgets/dialogs/qfscompleter_p.h
+++ b/src/widgets/dialogs/qfscompleter_p.h
@@ -64,8 +64,8 @@ QT_BEGIN_NAMESPACE
*/
class Q_WIDGETS_EXPORT QFSCompleter : public QCompleter {
public:
- explicit QFSCompleter(QFileSystemModel *model, QObject *parent = 0)
- : QCompleter(model, parent), proxyModel(0), sourceModel(model)
+ explicit QFSCompleter(QFileSystemModel *model, QObject *parent = nullptr)
+ : QCompleter(model, parent), proxyModel(nullptr), sourceModel(model)
{
#if defined(Q_OS_WIN)
setCaseSensitivity(Qt::CaseInsensitive);
diff --git a/src/widgets/dialogs/qsidebar_p.h b/src/widgets/dialogs/qsidebar_p.h
index 4a82f88878..6056f19452 100644
--- a/src/widgets/dialogs/qsidebar_p.h
+++ b/src/widgets/dialogs/qsidebar_p.h
@@ -67,7 +67,7 @@ class QFileSystemModel;
class QSideBarDelegate : public QStyledItemDelegate
{
public:
- QSideBarDelegate(QWidget *parent = 0) : QStyledItemDelegate(parent) {}
+ QSideBarDelegate(QWidget *parent = nullptr) : QStyledItemDelegate(parent) {}
void initStyleOption(QStyleOptionViewItem *option,
const QModelIndex &index) const override;
};
@@ -82,7 +82,7 @@ public:
EnabledRole = Qt::UserRole + 2
};
- QUrlModel(QObject *parent = 0);
+ QUrlModel(QObject *parent = nullptr);
QStringList mimeTypes() const override;
QMimeData *mimeData(const QModelIndexList &indexes) const override;
@@ -127,7 +127,7 @@ Q_SIGNALS:
void goToUrl(const QUrl &url);
public:
- QSidebar(QWidget *parent = 0);
+ QSidebar(QWidget *parent = nullptr);
void setModelAndUrls(QFileSystemModel *model, const QList<QUrl> &newUrls);
~QSidebar();
diff --git a/src/widgets/effects/qgraphicseffect_p.h b/src/widgets/effects/qgraphicseffect_p.h
index 2f3bd2f7fd..7e342a9f3c 100644
--- a/src/widgets/effects/qgraphicseffect_p.h
+++ b/src/widgets/effects/qgraphicseffect_p.h
@@ -80,11 +80,11 @@ public:
QRectF boundingRect(Qt::CoordinateSystem coordinateSystem = Qt::LogicalCoordinates) const;
QRect deviceRect() const;
QPixmap pixmap(Qt::CoordinateSystem system = Qt::LogicalCoordinates,
- QPoint *offset = 0,
+ QPoint *offset = nullptr,
QGraphicsEffect::PixmapPadMode mode = QGraphicsEffect::PadToEffectiveBoundingRect) const;
protected:
- QGraphicsEffectSource(QGraphicsEffectSourcePrivate &dd, QObject *parent = 0);
+ QGraphicsEffectSource(QGraphicsEffectSourcePrivate &dd, QObject *parent = nullptr);
private:
Q_DECLARE_PRIVATE(QGraphicsEffectSource)
@@ -125,7 +125,7 @@ public:
virtual void draw(QPainter *p) = 0;
virtual void update() = 0;
virtual bool isPixmap() const = 0;
- virtual QPixmap pixmap(Qt::CoordinateSystem system, QPoint *offset = 0,
+ virtual QPixmap pixmap(Qt::CoordinateSystem system, QPoint *offset = nullptr,
QGraphicsEffect::PixmapPadMode mode = QGraphicsEffect::PadToTransparentBorder) const = 0;
virtual void effectBoundingRectChanged() = 0;
@@ -149,7 +149,7 @@ class Q_WIDGETS_EXPORT QGraphicsEffectPrivate : public QObjectPrivate
{
Q_DECLARE_PUBLIC(QGraphicsEffect)
public:
- QGraphicsEffectPrivate() : source(0), isEnabled(1) {}
+ QGraphicsEffectPrivate() : source(nullptr), isEnabled(1) {}
~QGraphicsEffectPrivate();
inline void setGraphicsEffectSource(QGraphicsEffectSource *newSource)
diff --git a/src/widgets/effects/qpixmapfilter_p.h b/src/widgets/effects/qpixmapfilter_p.h
index 0f582bde60..c56acb8a24 100644
--- a/src/widgets/effects/qpixmapfilter_p.h
+++ b/src/widgets/effects/qpixmapfilter_p.h
@@ -100,7 +100,7 @@ class Q_WIDGETS_EXPORT QPixmapConvolutionFilter : public QPixmapFilter
Q_DECLARE_PRIVATE(QPixmapConvolutionFilter)
public:
- QPixmapConvolutionFilter(QObject *parent = 0);
+ QPixmapConvolutionFilter(QObject *parent = nullptr);
~QPixmapConvolutionFilter();
void setConvolutionKernel(const qreal *matrix, int rows, int columns);
@@ -124,7 +124,7 @@ class Q_WIDGETS_EXPORT QPixmapBlurFilter : public QPixmapFilter
Q_DECLARE_PRIVATE(QPixmapBlurFilter)
public:
- QPixmapBlurFilter(QObject *parent = 0);
+ QPixmapBlurFilter(QObject *parent = nullptr);
~QPixmapBlurFilter();
void setRadius(qreal radius);
@@ -148,7 +148,7 @@ class Q_WIDGETS_EXPORT QPixmapColorizeFilter : public QPixmapFilter
Q_DECLARE_PRIVATE(QPixmapColorizeFilter)
public:
- QPixmapColorizeFilter(QObject *parent = 0);
+ QPixmapColorizeFilter(QObject *parent = nullptr);
~QPixmapColorizeFilter();
void setColor(const QColor& color);
@@ -168,7 +168,7 @@ class Q_WIDGETS_EXPORT QPixmapDropShadowFilter : public QPixmapFilter
Q_DECLARE_PRIVATE(QPixmapDropShadowFilter)
public:
- QPixmapDropShadowFilter(QObject *parent = 0);
+ QPixmapDropShadowFilter(QObject *parent = nullptr);
~QPixmapDropShadowFilter();
QRectF boundingRectFor(const QRectF &rect) const override;
diff --git a/src/widgets/graphicsview/qgraphicsanchorlayout_p.h b/src/widgets/graphicsview/qgraphicsanchorlayout_p.h
index 699ca32bfe..b5f14948ac 100644
--- a/src/widgets/graphicsview/qgraphicsanchorlayout_p.h
+++ b/src/widgets/graphicsview/qgraphicsanchorlayout_p.h
@@ -89,7 +89,7 @@ struct AnchorVertex {
: m_item(item), m_edge(edge), m_type(Normal) {}
AnchorVertex()
- : m_item(0), m_edge(Qt::AnchorPoint(0)), m_type(Normal) {}
+ : m_item(nullptr), m_edge(Qt::AnchorPoint(0)), m_type(Normal) {}
#ifdef QT_DEBUG
inline QString toString() const;
@@ -123,18 +123,18 @@ struct AnchorData : public QSimplexVariable {
};
AnchorData()
- : QSimplexVariable(), from(0), to(0),
+ : QSimplexVariable(), from(nullptr), to(nullptr),
minSize(0), prefSize(0), maxSize(0),
minPrefSize(0), maxPrefSize(0),
sizeAtMinimum(0), sizeAtPreferred(0),
- sizeAtMaximum(0), item(0), graphicsAnchor(0),
+ sizeAtMaximum(0), item(nullptr), graphicsAnchor(nullptr),
type(Normal), isLayoutAnchor(false),
isCenterAnchor(false), orientation(0),
dependency(Independent) {}
virtual ~AnchorData();
virtual void updateChildrenSizes() {}
- void refreshSizeHints(const QLayoutStyleInfo *styleInfo = 0);
+ void refreshSizeHints(const QLayoutStyleInfo *styleInfo = nullptr);
#ifdef QT_DEBUG
void dump(int indent = 2);
@@ -402,7 +402,7 @@ public:
static QGraphicsAnchorLayoutPrivate *get(QGraphicsAnchorLayout *q)
{
- return q ? q->d_func() : 0;
+ return q ? q->d_func() : nullptr;
}
static Qt::AnchorPoint oppositeEdge(
@@ -443,7 +443,7 @@ public:
Qt::AnchorPoint firstEdge,
QGraphicsLayoutItem *secondItem,
Qt::AnchorPoint secondEdge,
- qreal *spacing = 0);
+ qreal *spacing = nullptr);
// Helper for Anchor Manipulation methods
void addAnchor_helper(QGraphicsLayoutItem *firstItem,
diff --git a/src/widgets/graphicsview/qgraphicsgridlayoutengine_p.h b/src/widgets/graphicsview/qgraphicsgridlayoutengine_p.h
index 370df9eed7..e98160e40f 100644
--- a/src/widgets/graphicsview/qgraphicsgridlayoutengine_p.h
+++ b/src/widgets/graphicsview/qgraphicsgridlayoutengine_p.h
@@ -68,7 +68,7 @@ class QGraphicsLayoutPrivate;
class QGraphicsGridLayoutEngineItem : public QGridLayoutItem {
public:
QGraphicsGridLayoutEngineItem(QGraphicsLayoutItem *item, int row, int columns, int rowSpan = 1, int columnSpan = 1,
- Qt::Alignment alignment = 0)
+ Qt::Alignment alignment = nullptr)
: QGridLayoutItem(row, columns, rowSpan, columnSpan, alignment), q_layoutItem(item) {}
virtual QLayoutPolicy::Policy sizePolicy(Qt::Orientation orientation) const override
@@ -115,7 +115,7 @@ public:
{
const int index = indexOf(layoutItem);
if (index < 0)
- return 0;
+ return nullptr;
return static_cast<QGraphicsGridLayoutEngineItem*>(q_items.at(index));
}
diff --git a/src/widgets/graphicsview/qgraphicsitem_p.h b/src/widgets/graphicsview/qgraphicsitem_p.h
index d586a22544..a2c3774f65 100644
--- a/src/widgets/graphicsview/qgraphicsitem_p.h
+++ b/src/widgets/graphicsview/qgraphicsitem_p.h
@@ -78,13 +78,13 @@ public:
typedef void (*ClearFunction)(QDeclarativeListProperty<T> *);
QDeclarativeListProperty()
- : object(0), data(0), append(0), count(0), at(0), clear(0), dummy1(0), dummy2(0) {}
+ : object(nullptr), data(nullptr), append(nullptr), count(nullptr), at(nullptr), clear(nullptr), dummy1(nullptr), dummy2(nullptr) {}
QDeclarativeListProperty(QObject *o, QList<T *> &list)
: object(o), data(&list), append(qlist_append), count(qlist_count), at(qlist_at),
- clear(qlist_clear), dummy1(0), dummy2(0) {}
+ clear(qlist_clear), dummy1(nullptr), dummy2(nullptr) {}
QDeclarativeListProperty(QObject *o, void *d, AppendFunction a, CountFunction c = 0, AtFunction t = 0,
ClearFunction r = 0)
- : object(o), data(d), append(a), count(c), at(t), clear(r), dummy1(0), dummy2(0) {}
+ : object(o), data(d), append(a), count(c), at(t), clear(r), dummy1(nullptr), dummy2(nullptr) {}
bool operator==(const QDeclarativeListProperty &o) const {
return object == o.object &&
@@ -198,8 +198,8 @@ public:
|| (ancestorFlags & AncestorIgnoresTransformations);
}
- void combineTransformToParent(QTransform *x, const QTransform *viewTransform = 0) const;
- void combineTransformFromParent(QTransform *x, const QTransform *viewTransform = 0) const;
+ void combineTransformToParent(QTransform *x, const QTransform *viewTransform = nullptr) const;
+ void combineTransformFromParent(QTransform *x, const QTransform *viewTransform = nullptr) const;
virtual void updateSceneTransformFromParent();
static bool movableAncestorIsSelected(const QGraphicsItem *item);
@@ -232,7 +232,7 @@ public:
void childrenBoundingRectHelper(QTransform *x, QRectF *rect, QGraphicsItem *topMostEffectItem);
void initStyleOption(QStyleOptionGraphicsItem *option, const QTransform &worldTransform,
const QRegion &exposedRegion, bool allItems = false) const;
- QRectF effectiveBoundingRect(QGraphicsItem *topMostEffectItem = 0) const;
+ QRectF effectiveBoundingRect(QGraphicsItem *topMostEffectItem = nullptr) const;
QRectF sceneEffectiveBoundingRect() const;
QRectF effectiveBoundingRect(const QRectF &rect) const;
@@ -408,8 +408,8 @@ public:
void setFocusHelper(Qt::FocusReason focusReason, bool climb, bool focusFromHide);
void clearFocusHelper(bool giveFocusToParent, bool hiddenByParentPanel);
- void setSubFocus(QGraphicsItem *rootItem = 0, QGraphicsItem *stopItem = 0);
- void clearSubFocus(QGraphicsItem *rootItem = 0, QGraphicsItem *stopItem = 0);
+ void setSubFocus(QGraphicsItem *rootItem = nullptr, QGraphicsItem *stopItem = nullptr);
+ void clearSubFocus(QGraphicsItem *rootItem = nullptr, QGraphicsItem *stopItem = nullptr);
void resetFocusProxy();
virtual void subFocusItemChange();
virtual void focusScopeItemChange(bool isSubFocusItem);
@@ -541,7 +541,7 @@ struct QGraphicsItemPrivate::TransformData
onlyTransform(true)
{ }
- QTransform computedFullTransform(QTransform *postmultiplyTransform = 0) const
+ QTransform computedFullTransform(QTransform *postmultiplyTransform = nullptr) const
{
if (onlyTransform) {
if (!postmultiplyTransform || postmultiplyTransform->isIdentity())
@@ -595,12 +595,12 @@ class QGraphicsItemEffectSourcePrivate : public QGraphicsEffectSourcePrivate
{
public:
QGraphicsItemEffectSourcePrivate(QGraphicsItem *i)
- : QGraphicsEffectSourcePrivate(), item(i), info(0)
+ : QGraphicsEffectSourcePrivate(), item(i), info(nullptr)
{}
void detach() override
{
- item->d_ptr->graphicsEffect = 0;
+ item->d_ptr->graphicsEffect = nullptr;
item->prepareGeometryChange();
}
@@ -608,7 +608,7 @@ public:
{ return item; }
const QWidget *widget() const override
- { return 0; }
+ { return nullptr; }
void update() override {
item->d_ptr->updateDueToGraphicsEffect = true;
@@ -628,7 +628,7 @@ public:
}
const QStyleOption *styleOption() const override
- { return info ? info->option : 0; }
+ { return info ? info->option : nullptr; }
QRect deviceRect() const override
{
@@ -644,7 +644,7 @@ public:
QPixmap pixmap(Qt::CoordinateSystem system,
QPoint *offset,
QGraphicsEffect::PixmapPadMode mode) const override;
- QRect paddedEffectRect(Qt::CoordinateSystem system, QGraphicsEffect::PixmapPadMode mode, const QRectF &sourceRect, bool *unpadded = 0) const;
+ QRect paddedEffectRect(Qt::CoordinateSystem system, QGraphicsEffect::PixmapPadMode mode, const QRectF &sourceRect, bool *unpadded = nullptr) const;
QGraphicsItem *item;
QGraphicsItemPaintInfo *info;
diff --git a/src/widgets/graphicsview/qgraphicslayout_p.h b/src/widgets/graphicsview/qgraphicslayout_p.h
index 302ad1e116..0d91151e22 100644
--- a/src/widgets/graphicsview/qgraphicslayout_p.h
+++ b/src/widgets/graphicsview/qgraphicslayout_p.h
@@ -91,7 +91,7 @@ public:
m_defaultSpacing[1] = style->pixelMetric(QStyle::PM_LayoutVerticalSpacing);
}
- inline void invalidate() { m_valid = false; m_style = 0; m_widget = 0; }
+ inline void invalidate() { m_valid = false; m_style = nullptr; m_widget = nullptr; }
inline QStyle *style() const { return m_style; }
inline QWidget *widget() const { return m_widget; }
@@ -130,7 +130,7 @@ class Q_AUTOTEST_EXPORT QGraphicsLayoutPrivate : public QGraphicsLayoutItemPriva
Q_DECLARE_PUBLIC(QGraphicsLayout)
public:
- QGraphicsLayoutPrivate() : QGraphicsLayoutItemPrivate(0, true), left(-1.0), top(-1.0), right(-1.0), bottom(-1.0),
+ QGraphicsLayoutPrivate() : QGraphicsLayoutItemPrivate(nullptr, true), left(-1.0), top(-1.0), right(-1.0), bottom(-1.0),
activated(true) { }
void reparentChildItems(QGraphicsItem *newParent);
diff --git a/src/widgets/graphicsview/qgraphicslayoutstyleinfo_p.h b/src/widgets/graphicsview/qgraphicslayoutstyleinfo_p.h
index c3af9f4554..9807efb26e 100644
--- a/src/widgets/graphicsview/qgraphicslayoutstyleinfo_p.h
+++ b/src/widgets/graphicsview/qgraphicslayoutstyleinfo_p.h
@@ -84,7 +84,7 @@ public:
virtual void invalidate() override
{
- m_style = 0;
+ m_style = nullptr;
QAbstractLayoutStyleInfo::invalidate();
}
diff --git a/src/widgets/graphicsview/qgraphicsscene_p.h b/src/widgets/graphicsview/qgraphicsscene_p.h
index a2d13436fc..7934359cee 100644
--- a/src/widgets/graphicsview/qgraphicsscene_p.h
+++ b/src/widgets/graphicsview/qgraphicsscene_p.h
@@ -226,7 +226,7 @@ public:
void drawSubtreeRecursive(QGraphicsItem *item, QPainter *painter, const QTransform *const,
QRegion *exposedRegion, QWidget *widget, qreal parentOpacity = qreal(1.0),
- const QTransform *const effectTransform = 0);
+ const QTransform *const effectTransform = nullptr);
void draw(QGraphicsItem *, QPainter *, const QTransform *const, const QTransform *const,
QRegion *, QWidget *, qreal, const QTransform *const, bool, bool);
@@ -312,9 +312,9 @@ public:
void gestureTargetsAtHotSpots(const QSet<QGesture *> &gestures,
Qt::GestureFlag flag,
QHash<QGraphicsObject *, QSet<QGesture *> > *targets,
- QSet<QGraphicsObject *> *itemsSet = 0,
- QSet<QGesture *> *normal = 0,
- QSet<QGesture *> *conflicts = 0);
+ QSet<QGraphicsObject *> *itemsSet = nullptr,
+ QSet<QGesture *> *normal = nullptr,
+ QSet<QGesture *> *conflicts = nullptr);
void cancelGesturesForChildren(QGesture *original);
void grabGesture(QGraphicsItem *, Qt::GestureType gesture);
void ungrabGesture(QGraphicsItem *, Qt::GestureType gesture);
diff --git a/src/widgets/graphicsview/qgraphicsscenebsptreeindex_p.h b/src/widgets/graphicsview/qgraphicsscenebsptreeindex_p.h
index eb6bbbf49b..7e0e525a6b 100644
--- a/src/widgets/graphicsview/qgraphicsscenebsptreeindex_p.h
+++ b/src/widgets/graphicsview/qgraphicsscenebsptreeindex_p.h
@@ -74,7 +74,7 @@ class Q_AUTOTEST_EXPORT QGraphicsSceneBspTreeIndex : public QGraphicsSceneIndex
Q_OBJECT
Q_PROPERTY(int bspTreeDepth READ bspTreeDepth WRITE setBspTreeDepth)
public:
- QGraphicsSceneBspTreeIndex(QGraphicsScene *scene = 0);
+ QGraphicsSceneBspTreeIndex(QGraphicsScene *scene = nullptr);
~QGraphicsSceneBspTreeIndex();
QList<QGraphicsItem *> estimateItems(const QRectF &rect, Qt::SortOrder order) const override;
diff --git a/src/widgets/graphicsview/qgraphicssceneindex_p.h b/src/widgets/graphicsview/qgraphicssceneindex_p.h
index 86637e836b..b494c52671 100644
--- a/src/widgets/graphicsview/qgraphicssceneindex_p.h
+++ b/src/widgets/graphicsview/qgraphicssceneindex_p.h
@@ -77,7 +77,7 @@ class Q_AUTOTEST_EXPORT QGraphicsSceneIndex : public QObject
Q_OBJECT
public:
- QGraphicsSceneIndex(QGraphicsScene *scene = 0);
+ QGraphicsSceneIndex(QGraphicsScene *scene = nullptr);
virtual ~QGraphicsSceneIndex();
QGraphicsScene *scene() const;
diff --git a/src/widgets/graphicsview/qgraphicsscenelinearindex_p.h b/src/widgets/graphicsview/qgraphicsscenelinearindex_p.h
index 07d5d80ef1..ead52c1fb0 100644
--- a/src/widgets/graphicsview/qgraphicsscenelinearindex_p.h
+++ b/src/widgets/graphicsview/qgraphicsscenelinearindex_p.h
@@ -67,7 +67,7 @@ class Q_AUTOTEST_EXPORT QGraphicsSceneLinearIndex : public QGraphicsSceneIndex
Q_OBJECT
public:
- QGraphicsSceneLinearIndex(QGraphicsScene *scene = 0) : QGraphicsSceneIndex(scene), m_numSortedElements(0)
+ QGraphicsSceneLinearIndex(QGraphicsScene *scene = nullptr) : QGraphicsSceneIndex(scene), m_numSortedElements(0)
{ }
QList<QGraphicsItem *> items(Qt::SortOrder order = Qt::DescendingOrder) const override
diff --git a/src/widgets/graphicsview/qgraphicstransform_p.h b/src/widgets/graphicsview/qgraphicstransform_p.h
index e54ee9fb3c..05e12c3e64 100644
--- a/src/widgets/graphicsview/qgraphicstransform_p.h
+++ b/src/widgets/graphicsview/qgraphicstransform_p.h
@@ -66,7 +66,7 @@ public:
Q_DECLARE_PUBLIC(QGraphicsTransform)
QGraphicsTransformPrivate()
- : QObjectPrivate(), item(0) {}
+ : QObjectPrivate(), item(nullptr) {}
~QGraphicsTransformPrivate();
QGraphicsItem *item;
diff --git a/src/widgets/graphicsview/qgraphicswidget_p.h b/src/widgets/graphicsview/qgraphicswidget_p.h
index 505a2a24c0..821f8c73f1 100644
--- a/src/widgets/graphicsview/qgraphicswidget_p.h
+++ b/src/widgets/graphicsview/qgraphicswidget_p.h
@@ -82,7 +82,7 @@ public:
mutable qreal *margins;
void ensureMargins() const;
- void fixFocusChainBeforeReparenting(QGraphicsWidget *newParent, QGraphicsScene *oldScene, QGraphicsScene *newScene = 0);
+ void fixFocusChainBeforeReparenting(QGraphicsWidget *newParent, QGraphicsScene *oldScene, QGraphicsScene *newScene = nullptr);
void setLayout_helper(QGraphicsLayout *l);
// Layouts
diff --git a/src/widgets/graphicsview/qsimplex_p.h b/src/widgets/graphicsview/qsimplex_p.h
index 369f2f5f82..a69cef6115 100644
--- a/src/widgets/graphicsview/qsimplex_p.h
+++ b/src/widgets/graphicsview/qsimplex_p.h
@@ -82,7 +82,7 @@ struct QSimplexVariable
*/
struct QSimplexConstraint
{
- QSimplexConstraint() : constant(0), ratio(Equal), artificial(0) {}
+ QSimplexConstraint() : constant(0), ratio(Equal), artificial(nullptr) {}
enum Ratio {
LessOrEqual = 0,
diff --git a/src/widgets/itemviews/qcolumnview_p.h b/src/widgets/itemviews/qcolumnview_p.h
index 7b36b1f3da..c60579255e 100644
--- a/src/widgets/itemviews/qcolumnview_p.h
+++ b/src/widgets/itemviews/qcolumnview_p.h
@@ -74,7 +74,7 @@ QT_BEGIN_NAMESPACE
class QColumnViewPreviewColumn : public QAbstractItemView {
public:
- explicit QColumnViewPreviewColumn(QWidget *parent) : QAbstractItemView(parent), previewWidget(0) {
+ explicit QColumnViewPreviewColumn(QWidget *parent) : QAbstractItemView(parent), previewWidget(nullptr) {
}
void setPreviewWidget(QWidget *widget) {
@@ -186,7 +186,7 @@ class QColumnViewDelegate : public QItemDelegate
{
public:
- explicit QColumnViewDelegate(QObject *parent = 0) : QItemDelegate(parent) {}
+ explicit QColumnViewDelegate(QObject *parent = nullptr) : QItemDelegate(parent) {}
~QColumnViewDelegate() {}
void paint(QPainter *painter,
diff --git a/src/widgets/itemviews/qcolumnviewgrip_p.h b/src/widgets/itemviews/qcolumnviewgrip_p.h
index 5eb8012204..4311edbeb4 100644
--- a/src/widgets/itemviews/qcolumnviewgrip_p.h
+++ b/src/widgets/itemviews/qcolumnviewgrip_p.h
@@ -68,12 +68,12 @@ Q_SIGNALS:
void gripMoved(int offset);
public:
- explicit QColumnViewGrip(QWidget *parent = 0);
+ explicit QColumnViewGrip(QWidget *parent = nullptr);
~QColumnViewGrip();
int moveGrip(int offset);
protected:
- QColumnViewGrip(QColumnViewGripPrivate &, QWidget *parent = 0, Qt::WindowFlags f = 0);
+ QColumnViewGrip(QColumnViewGripPrivate &, QWidget *parent = nullptr, Qt::WindowFlags f = nullptr);
void paintEvent(QPaintEvent *event) override;
void mouseDoubleClickEvent(QMouseEvent *event) override;
void mouseMoveEvent(QMouseEvent *event) override;
diff --git a/src/widgets/itemviews/qheaderview_p.h b/src/widgets/itemviews/qheaderview_p.h
index d9fc1baec5..766adef36d 100644
--- a/src/widgets/itemviews/qheaderview_p.h
+++ b/src/widgets/itemviews/qheaderview_p.h
@@ -102,7 +102,7 @@ public:
lastSectionLogicalIdx(-1), // Only trust when we stretch last section
sectionIndicatorOffset(0),
#if QT_CONFIG(label)
- sectionIndicator(0),
+ sectionIndicator(nullptr),
#endif
globalResizeMode(QHeaderView::Interactive),
sectionStartposRecalc(true),
diff --git a/src/widgets/itemviews/qlistview_p.h b/src/widgets/itemviews/qlistview_p.h
index c6810f8fdc..86331bb862 100644
--- a/src/widgets/itemviews/qlistview_p.h
+++ b/src/widgets/itemviews/qlistview_p.h
@@ -248,7 +248,7 @@ private:
class QIconModeViewBase : public QCommonListViewBase
{
public:
- QIconModeViewBase(QListView *q, QListViewPrivate *d) : QCommonListViewBase(q, d), interSectingVector(0) {}
+ QIconModeViewBase(QListView *q, QListViewPrivate *d) : QCommonListViewBase(q, d), interSectingVector(nullptr) {}
QBspTree tree;
QVector<QListViewItem> items;
diff --git a/src/widgets/itemviews/qtableview_p.h b/src/widgets/itemviews/qtableview_p.h
index d55462c28b..f629dfcd09 100644
--- a/src/widgets/itemviews/qtableview_p.h
+++ b/src/widgets/itemviews/qtableview_p.h
@@ -137,7 +137,7 @@ public:
: showGrid(true), gridStyle(Qt::SolidLine),
rowSectionAnchor(-1), columnSectionAnchor(-1),
columnResizeTimerID(0), rowResizeTimerID(0),
- horizontalHeader(0), verticalHeader(0),
+ horizontalHeader(nullptr), verticalHeader(nullptr),
sortingEnabled(false), geometryRecursionBlock(false),
visualCursor(QPoint())
{
diff --git a/src/widgets/itemviews/qtreeview_p.h b/src/widgets/itemviews/qtreeview_p.h
index 9666a9f8c2..836d8f0c2d 100644
--- a/src/widgets/itemviews/qtreeview_p.h
+++ b/src/widgets/itemviews/qtreeview_p.h
@@ -87,7 +87,7 @@ public:
QTreeViewPrivate()
: QAbstractItemViewPrivate(),
- header(0), indent(20), lastViewedItem(0), defaultItemHeight(-1),
+ header(nullptr), indent(20), lastViewedItem(0), defaultItemHeight(-1),
uniformRowHeights(false), rootDecoration(true),
itemsExpandable(true), sortingEnabled(false),
expandsOnDoubleClick(true),
@@ -157,7 +157,7 @@ public:
bool checkViewItems() const;
#endif
- int firstVisibleItem(int *offset = 0) const;
+ int firstVisibleItem(int *offset = nullptr) const;
int lastVisibleItem(int firstVisual = -1, int offset = -1) const;
int columnAt(int x) const;
bool hasVisibleChildren( const QModelIndex& parent) const;
diff --git a/src/widgets/itemviews/qtreewidget_p.h b/src/widgets/itemviews/qtreewidget_p.h
index ee4a633468..81e7e86203 100644
--- a/src/widgets/itemviews/qtreewidget_p.h
+++ b/src/widgets/itemviews/qtreewidget_p.h
@@ -78,7 +78,7 @@ class QTreeModel : public QAbstractItemModel
friend class QTreeWidgetItemIteratorPrivate;
public:
- explicit QTreeModel(int columns = 0, QTreeWidget *parent = 0);
+ explicit QTreeModel(int columns = 0, QTreeWidget *parent = nullptr);
~QTreeModel();
inline QTreeWidget *view() const
@@ -140,7 +140,7 @@ public:
{ return createIndex(row, col, item); }
protected:
- QTreeModel(QTreeModelPrivate &, QTreeWidget *parent = 0);
+ QTreeModel(QTreeModelPrivate &, QTreeWidget *parent = nullptr);
void emitDataChanged(QTreeWidgetItem *item, int column, const QVector<int> &roles);
void beginInsertItems(QTreeWidgetItem *parent, int row, int count);
void endInsertItems();
diff --git a/src/widgets/kernel/qapplication_p.h b/src/widgets/kernel/qapplication_p.h
index 133279f977..98eb9b73c6 100644
--- a/src/widgets/kernel/qapplication_p.h
+++ b/src/widgets/kernel/qapplication_p.h
@@ -128,10 +128,10 @@ public:
void notifyWindowIconChanged() override;
//modality
- bool isWindowBlocked(QWindow *window, QWindow **blockingWindow = 0) const override;
+ bool isWindowBlocked(QWindow *window, QWindow **blockingWindow = nullptr) const override;
static bool isBlockedByModal(QWidget *widget);
static bool modalState();
- static bool tryModalHelper(QWidget *widget, QWidget **rettop = 0);
+ static bool tryModalHelper(QWidget *widget, QWidget **rettop = nullptr);
#if 0 // Used to be included in Qt4 for Q_WS_MAC
static QWidget *tryModalHelper_sys(QWidget *top);
bool canQuit();
@@ -157,7 +157,7 @@ public:
void openPopup(QWidget *popup);
static void setFocusWidget(QWidget *focus, Qt::FocusReason reason);
static QWidget *focusNextPrevChild_helper(QWidget *toplevel, bool next,
- bool *wrappingOccurred = 0);
+ bool *wrappingOccurred = nullptr);
#if QT_CONFIG(graphicsview)
// Maintain a list of all scenes to ensure font and palette propagation to
@@ -238,7 +238,7 @@ public:
return window;
if (const QWidget *nativeParent = widget->nativeParentWidget())
return nativeParent->windowHandle();
- return 0;
+ return nullptr;
}
#ifdef Q_OS_WIN
diff --git a/src/widgets/kernel/qgesture_p.h b/src/widgets/kernel/qgesture_p.h
index 636103c1e1..cbf8d60892 100644
--- a/src/widgets/kernel/qgesture_p.h
+++ b/src/widgets/kernel/qgesture_p.h
@@ -111,7 +111,7 @@ class QPinchGesturePrivate : public QGesturePrivate
public:
QPinchGesturePrivate()
- : totalChangeFlags(0), changeFlags(0),
+ : totalChangeFlags(nullptr), changeFlags(nullptr),
totalScaleFactor(1), lastScaleFactor(1), scaleFactor(1),
totalRotationAngle(0), lastRotationAngle(0), rotationAngle(0),
isNewSequence(true)
diff --git a/src/widgets/kernel/qlayout_p.h b/src/widgets/kernel/qlayout_p.h
index 8a1b12a6be..8e1d773355 100644
--- a/src/widgets/kernel/qlayout_p.h
+++ b/src/widgets/kernel/qlayout_p.h
@@ -80,7 +80,7 @@ public:
static QWidgetItem *createWidgetItem(const QLayout *layout, QWidget *widget);
static QSpacerItem *createSpacerItem(const QLayout *layout, int w, int h, QSizePolicy::Policy hPolicy = QSizePolicy::Minimum, QSizePolicy::Policy vPolicy = QSizePolicy::Minimum);
- virtual QLayoutItem* replaceAt(int index, QLayoutItem *newitem) { Q_UNUSED(index); Q_UNUSED(newitem); return 0; }
+ virtual QLayoutItem* replaceAt(int index, QLayoutItem *newitem) { Q_UNUSED(index); Q_UNUSED(newitem); return nullptr; }
static QWidgetItemFactoryMethod widgetItemFactoryMethod;
static QSpacerItemFactoryMethod spacerItemFactoryMethod;
diff --git a/src/widgets/kernel/qlayoutengine_p.h b/src/widgets/kernel/qlayoutengine_p.h
index 812fa7cf3b..948c2424e6 100644
--- a/src/widgets/kernel/qlayoutengine_p.h
+++ b/src/widgets/kernel/qlayoutengine_p.h
@@ -105,9 +105,9 @@ Q_WIDGETS_EXPORT QSize qSmartMinSize(const QWidgetItem *i);
Q_WIDGETS_EXPORT QSize qSmartMinSize(const QWidget *w);
Q_WIDGETS_EXPORT QSize qSmartMaxSize(const QSize &sizeHint,
const QSize &minSize, const QSize &maxSize,
- const QSizePolicy &sizePolicy, Qt::Alignment align = 0);
-Q_WIDGETS_EXPORT QSize qSmartMaxSize(const QWidgetItem *i, Qt::Alignment align = 0);
-Q_WIDGETS_EXPORT QSize qSmartMaxSize(const QWidget *w, Qt::Alignment align = 0);
+ const QSizePolicy &sizePolicy, Qt::Alignment align = nullptr);
+Q_WIDGETS_EXPORT QSize qSmartMaxSize(const QWidgetItem *i, Qt::Alignment align = nullptr);
+Q_WIDGETS_EXPORT QSize qSmartMaxSize(const QWidget *w, Qt::Alignment align = nullptr);
Q_WIDGETS_EXPORT int qSmartSpacing(const QLayout *layout, QStyle::PixelMetric pm);
diff --git a/src/widgets/kernel/qwidget_p.h b/src/widgets/kernel/qwidget_p.h
index 797963b931..90c4c2a945 100644
--- a/src/widgets/kernel/qwidget_p.h
+++ b/src/widgets/kernel/qwidget_p.h
@@ -146,7 +146,7 @@ public:
inline operator bool() const
{
- return (0 != m_ptr);
+ return (nullptr != m_ptr);
}
private:
@@ -411,7 +411,7 @@ public:
void render(QPaintDevice *target, const QPoint &targetOffset, const QRegion &sourceRegion,
QWidget::RenderFlags renderFlags);
void drawWidget(QPaintDevice *pdev, const QRegion &rgn, const QPoint &offset, int flags,
- QPainter *sharedPainter = 0, QWidgetBackingStore *backingStore = 0);
+ QPainter *sharedPainter = nullptr, QWidgetBackingStore *backingStore = nullptr);
void sendPaintEvent(const QRegion &toBePainted);
@@ -428,7 +428,7 @@ public:
QRegion clipRegion() const;
void setSystemClip(QPaintEngine *paintEngine, qreal devicePixelRatio, const QRegion &region);
void subtractOpaqueChildren(QRegion &rgn, const QRect &clipRect) const;
- void subtractOpaqueSiblings(QRegion &source, bool *hasDirtySiblingsAbove = 0,
+ void subtractOpaqueSiblings(QRegion &source, bool *hasDirtySiblingsAbove = nullptr,
bool alsoNonOpaque = false) const;
void clipToEffectiveMask(QRegion &region) const;
void updateIsOpaque();
@@ -525,7 +525,7 @@ public:
void getLayoutItemMargins(int *left, int *top, int *right, int *bottom) const;
void setLayoutItemMargins(int left, int top, int right, int bottom);
- void setLayoutItemMargins(QStyle::SubElement element, const QStyleOption *opt = 0);
+ void setLayoutItemMargins(QStyle::SubElement element, const QStyleOption *opt = nullptr);
void updateContentsRect();
QMargins safeAreaMargins() const;
@@ -555,7 +555,7 @@ public:
QGraphicsProxyWidget *ancestorProxy = widget->d_func()->nearestGraphicsProxyWidget(widget);
//It's embedded if it has an ancestor
if (ancestorProxy) {
- if (!bypassGraphicsProxyWidget(widget) && ancestorProxy->scene() != 0) {
+ if (!bypassGraphicsProxyWidget(widget) && ancestorProxy->scene() != nullptr) {
// One view, let be smart and return the viewport rect then the popup is aligned
if (ancestorProxy->scene()->views().size() == 1) {
QGraphicsView *view = ancestorProxy->scene()->views().at(0);
@@ -586,7 +586,7 @@ public:
}
inline void restoreRedirected()
- { redirectDev = 0; }
+ { redirectDev = nullptr; }
inline void enforceNativeChildren()
{
@@ -652,7 +652,7 @@ public:
QOpenGLContext *shareContext() const;
- virtual QObject *focusObject() { return 0; }
+ virtual QObject *focusObject() { return nullptr; }
#ifndef QT_NO_OPENGL
virtual GLuint textureId() const { return 0; }
@@ -660,7 +660,7 @@ public:
Q_Q(QWidget);
return q->testAttribute(Qt::WA_AlwaysStackOnTop)
? QPlatformTextureList::StacksOnTop
- : QPlatformTextureList::Flags(0);
+ : QPlatformTextureList::Flags(nullptr);
}
virtual QImage grabFramebuffer() { return QImage(); }
virtual void beginBackingStorePainting() { }
@@ -904,7 +904,7 @@ struct QWidgetPaintContext
{
inline QWidgetPaintContext(QPaintDevice *d, const QRegion &r, const QPoint &o, int f,
QPainter *p, QWidgetBackingStore *b)
- : pdev(d), rgn(r), offset(o), flags(f), sharedPainter(p), backingStore(b), painter(0) {}
+ : pdev(d), rgn(r), offset(o), flags(f), sharedPainter(p), backingStore(b), painter(nullptr) {}
QPaintDevice *pdev;
QRegion rgn;
@@ -920,14 +920,14 @@ class QWidgetEffectSourcePrivate : public QGraphicsEffectSourcePrivate
{
public:
QWidgetEffectSourcePrivate(QWidget *widget)
- : QGraphicsEffectSourcePrivate(), m_widget(widget), context(0), updateDueToGraphicsEffect(false)
+ : QGraphicsEffectSourcePrivate(), m_widget(widget), context(nullptr), updateDueToGraphicsEffect(false)
{}
void detach() override
- { m_widget->d_func()->graphicsEffect = 0; }
+ { m_widget->d_func()->graphicsEffect = nullptr; }
const QGraphicsItem *graphicsItem() const override
- { return 0; }
+ { return nullptr; }
const QWidget *widget() const override
{ return m_widget; }
@@ -953,7 +953,7 @@ public:
}
const QStyleOption *styleOption() const override
- { return 0; }
+ { return nullptr; }
QRect deviceRect() const override
{ return m_widget->window()->rect(); }
@@ -983,14 +983,14 @@ inline QTLWExtra *QWidgetPrivate::topData() const
inline QTLWExtra *QWidgetPrivate::maybeTopData() const
{
- return extra ? extra->topextra : 0;
+ return extra ? extra->topextra : nullptr;
}
inline QPainter *QWidgetPrivate::sharedPainter() const
{
Q_Q(const QWidget);
QTLWExtra *x = q->window()->d_func()->maybeTopData();
- return x ? x->sharedPainter : 0;
+ return x ? x->sharedPainter : nullptr;
}
inline void QWidgetPrivate::setSharedPainter(QPainter *painter)
@@ -1011,7 +1011,7 @@ inline QWidgetBackingStore *QWidgetPrivate::maybeBackingStore() const
{
Q_Q(const QWidget);
QTLWExtra *x = q->window()->d_func()->maybeTopData();
- return x ? x->backingStoreTracker.data() : 0;
+ return x ? x->backingStoreTracker.data() : nullptr;
}
inline QWidgetWindow *QWidgetPrivate::windowHandle() const
diff --git a/src/widgets/kernel/qwidgetbackingstore_p.h b/src/widgets/kernel/qwidgetbackingstore_p.h
index e7a2bca33a..9409ba7832 100644
--- a/src/widgets/kernel/qwidgetbackingstore_p.h
+++ b/src/widgets/kernel/qwidgetbackingstore_p.h
@@ -109,7 +109,7 @@ public:
void sync(QWidget *exposedWidget, const QRegion &exposedRegion);
void sync();
- void flush(QWidget *widget = 0);
+ void flush(QWidget *widget = nullptr);
QBackingStore *backingStore() const { return store; }
@@ -154,8 +154,8 @@ private:
BeginPaintInfo *returnInfo, bool toCleanIsInTopLevelCoordinates = true);
void endPaint(const QRegion &cleaned, QBackingStore *backingStore, BeginPaintInfo *beginPaintInfo);
- QRegion dirtyRegion(QWidget *widget = 0) const;
- QRegion staticContents(QWidget *widget = 0, const QRect &withinClipRect = QRect()) const;
+ QRegion dirtyRegion(QWidget *widget = nullptr) const;
+ QRegion staticContents(QWidget *widget = nullptr, const QRect &withinClipRect = QRect()) const;
void markDirtyOnScreen(const QRegion &dirtyOnScreen, QWidget *widget, const QPoint &topLevelOffset);
diff --git a/src/widgets/kernel/qwindowcontainer_p.h b/src/widgets/kernel/qwindowcontainer_p.h
index a8754232a8..c6de168c10 100644
--- a/src/widgets/kernel/qwindowcontainer_p.h
+++ b/src/widgets/kernel/qwindowcontainer_p.h
@@ -64,7 +64,7 @@ class Q_WIDGETS_EXPORT QWindowContainer : public QWidget
Q_DECLARE_PRIVATE(QWindowContainer)
public:
- explicit QWindowContainer(QWindow *embeddedWindow, QWidget *parent = 0, Qt::WindowFlags f = 0);
+ explicit QWindowContainer(QWindow *embeddedWindow, QWidget *parent = nullptr, Qt::WindowFlags f = nullptr);
~QWindowContainer();
QWindow *containedWindow() const;
diff --git a/src/widgets/statemachine/qbasickeyeventtransition_p.h b/src/widgets/statemachine/qbasickeyeventtransition_p.h
index 7e1b978bba..f23c078570 100644
--- a/src/widgets/statemachine/qbasickeyeventtransition_p.h
+++ b/src/widgets/statemachine/qbasickeyeventtransition_p.h
@@ -63,11 +63,11 @@ class Q_AUTOTEST_EXPORT QBasicKeyEventTransition : public QAbstractTransition
{
Q_OBJECT
public:
- QBasicKeyEventTransition(QState *sourceState = 0);
- QBasicKeyEventTransition(QEvent::Type type, int key, QState *sourceState = 0);
+ QBasicKeyEventTransition(QState *sourceState = nullptr);
+ QBasicKeyEventTransition(QEvent::Type type, int key, QState *sourceState = nullptr);
QBasicKeyEventTransition(QEvent::Type type, int key,
Qt::KeyboardModifiers modifierMask,
- QState *sourceState = 0);
+ QState *sourceState = nullptr);
~QBasicKeyEventTransition();
QEvent::Type eventType() const;
diff --git a/src/widgets/statemachine/qbasicmouseeventtransition_p.h b/src/widgets/statemachine/qbasicmouseeventtransition_p.h
index 132e223535..dd619d189c 100644
--- a/src/widgets/statemachine/qbasicmouseeventtransition_p.h
+++ b/src/widgets/statemachine/qbasicmouseeventtransition_p.h
@@ -65,9 +65,9 @@ class Q_AUTOTEST_EXPORT QBasicMouseEventTransition : public QAbstractTransition
{
Q_OBJECT
public:
- QBasicMouseEventTransition(QState *sourceState = 0);
+ QBasicMouseEventTransition(QState *sourceState = nullptr);
QBasicMouseEventTransition(QEvent::Type type, Qt::MouseButton button,
- QState *sourceState = 0);
+ QState *sourceState = nullptr);
~QBasicMouseEventTransition();
QEvent::Type eventType() const;
diff --git a/src/widgets/styles/qcommonstyle_p.h b/src/widgets/styles/qcommonstyle_p.h
index 296f89ce5f..4860dfe4c9 100644
--- a/src/widgets/styles/qcommonstyle_p.h
+++ b/src/widgets/styles/qcommonstyle_p.h
@@ -71,7 +71,7 @@ class Q_WIDGETS_EXPORT QCommonStylePrivate : public QStylePrivate
public:
inline QCommonStylePrivate() :
#if QT_CONFIG(itemviews)
- cachedOption(0),
+ cachedOption(nullptr),
#endif
animationFps(30)
{ }
diff --git a/src/widgets/styles/qfusionstyle_p.h b/src/widgets/styles/qfusionstyle_p.h
index e67e792727..cbefe3e1af 100644
--- a/src/widgets/styles/qfusionstyle_p.h
+++ b/src/widgets/styles/qfusionstyle_p.h
@@ -72,28 +72,28 @@ public:
QPalette standardPalette () const override;
void drawPrimitive(PrimitiveElement elem,
const QStyleOption *option,
- QPainter *painter, const QWidget *widget = 0) const override;
+ QPainter *painter, const QWidget *widget = nullptr) const override;
void drawControl(ControlElement ce, const QStyleOption *option, QPainter *painter,
const QWidget *widget) const override;
- int pixelMetric(PixelMetric metric, const QStyleOption *option = 0, const QWidget *widget = 0) const override;
+ int pixelMetric(PixelMetric metric, const QStyleOption *option = nullptr, const QWidget *widget = nullptr) const override;
void drawComplexControl(ComplexControl control, const QStyleOptionComplex *option,
QPainter *painter, const QWidget *widget) const override;
- QRect subElementRect(SubElement r, const QStyleOption *opt, const QWidget *widget = 0) const override;
+ QRect subElementRect(SubElement r, const QStyleOption *opt, const QWidget *widget = nullptr) const override;
QSize sizeFromContents(ContentsType type, const QStyleOption *option,
const QSize &size, const QWidget *widget) const override;
SubControl hitTestComplexControl(ComplexControl cc, const QStyleOptionComplex *opt,
- const QPoint &pt, const QWidget *w = 0) const override;
+ const QPoint &pt, const QWidget *w = nullptr) const override;
QRect subControlRect(ComplexControl cc, const QStyleOptionComplex *opt,
SubControl sc, const QWidget *widget) const override;
QPixmap generatedIconPixmap(QIcon::Mode iconMode, const QPixmap &pixmap,
const QStyleOption *opt) const override;
- int styleHint(StyleHint hint, const QStyleOption *option = 0, const QWidget *widget = 0,
- QStyleHintReturn *returnData = 0) const override;
+ int styleHint(StyleHint hint, const QStyleOption *option = nullptr, const QWidget *widget = nullptr,
+ QStyleHintReturn *returnData = nullptr) const override;
QRect itemPixmapRect(const QRect &r, int flags, const QPixmap &pixmap) const override;
- QIcon standardIcon(StandardPixmap standardIcon, const QStyleOption *option = 0,
- const QWidget *widget = 0) const override;
+ QIcon standardIcon(StandardPixmap standardIcon, const QStyleOption *option = nullptr,
+ const QWidget *widget = nullptr) const override;
QPixmap standardPixmap(StandardPixmap standardPixmap, const QStyleOption *opt,
- const QWidget *widget = 0) const override;
+ const QWidget *widget = nullptr) const override;
void drawItemPixmap(QPainter *painter, const QRect &rect,
int alignment, const QPixmap &pixmap) const override;
void drawItemText(QPainter *painter, const QRect &rect,
diff --git a/src/widgets/styles/qpixmapstyle_p.h b/src/widgets/styles/qpixmapstyle_p.h
index 590434d95e..d32631a527 100644
--- a/src/widgets/styles/qpixmapstyle_p.h
+++ b/src/widgets/styles/qpixmapstyle_p.h
@@ -147,7 +147,7 @@ public:
void drawControl(ControlElement element, const QStyleOption *option,
QPainter *painter, const QWidget *widget = nullptr) const override;
void drawComplexControl(ComplexControl cc, const QStyleOptionComplex *option,
- QPainter *painter, const QWidget *widget=0) const override;
+ QPainter *painter, const QWidget *widget=nullptr) const override;
QSize sizeFromContents(ContentsType type, const QStyleOption *option,
const QSize &contentsSize, const QWidget *widget = nullptr) const override;
diff --git a/src/widgets/styles/qproxystyle_p.h b/src/widgets/styles/qproxystyle_p.h
index 2343a03e2a..2321f0fed0 100644
--- a/src/widgets/styles/qproxystyle_p.h
+++ b/src/widgets/styles/qproxystyle_p.h
@@ -67,7 +67,7 @@ public:
void ensureBaseStyle() const;
private:
QProxyStylePrivate() :
- QCommonStylePrivate(), baseStyle(0) {}
+ QCommonStylePrivate(), baseStyle(nullptr) {}
mutable QPointer <QStyle> baseStyle;
};
diff --git a/src/widgets/styles/qstyle_p.h b/src/widgets/styles/qstyle_p.h
index cdea29f944..d68bbfd03b 100644
--- a/src/widgets/styles/qstyle_p.h
+++ b/src/widgets/styles/qstyle_p.h
@@ -66,7 +66,7 @@ class QStylePrivate: public QObjectPrivate
Q_DECLARE_PUBLIC(QStyle)
public:
inline QStylePrivate()
- : layoutSpacingIndex(-1), proxyStyle(0) {}
+ : layoutSpacingIndex(-1), proxyStyle(nullptr) {}
mutable int layoutSpacingIndex;
QStyle *proxyStyle;
};
diff --git a/src/widgets/styles/qstylehelper_p.h b/src/widgets/styles/qstylehelper_p.h
index d79dfe4288..fe052b8984 100644
--- a/src/widgets/styles/qstylehelper_p.h
+++ b/src/widgets/styles/qstylehelper_p.h
@@ -89,11 +89,11 @@ namespace QStyleHelper
Q_WIDGETS_EXPORT bool isInstanceOf(QObject *obj, QAccessible::Role role);
Q_WIDGETS_EXPORT bool hasAncestor(QObject *obj, QAccessible::Role role);
#endif
- Q_WIDGETS_EXPORT QColor backgroundColor(const QPalette &pal, const QWidget* widget = 0);
+ Q_WIDGETS_EXPORT QColor backgroundColor(const QPalette &pal, const QWidget* widget = nullptr);
enum WidgetSizePolicy { SizeLarge = 0, SizeSmall = 1, SizeMini = 2, SizeDefault = -1 };
- Q_WIDGETS_EXPORT WidgetSizePolicy widgetSizePolicy(const QWidget *w, const QStyleOption *opt = 0);
+ Q_WIDGETS_EXPORT WidgetSizePolicy widgetSizePolicy(const QWidget *w, const QStyleOption *opt = nullptr);
}
diff --git a/src/widgets/styles/qstylesheetstyle_p.h b/src/widgets/styles/qstylesheetstyle_p.h
index 9c4b87fc32..c5266558af 100644
--- a/src/widgets/styles/qstylesheetstyle_p.h
+++ b/src/widgets/styles/qstylesheetstyle_p.h
@@ -82,40 +82,40 @@ public:
~QStyleSheetStyle();
void drawComplexControl(ComplexControl cc, const QStyleOptionComplex *opt, QPainter *p,
- const QWidget *w = 0) const override;
+ const QWidget *w = nullptr) const override;
void drawControl(ControlElement element, const QStyleOption *opt, QPainter *p,
- const QWidget *w = 0) const override;
+ const QWidget *w = nullptr) const override;
void drawItemPixmap(QPainter *painter, const QRect &rect, int alignment, const QPixmap &pixmap) const override;
void drawItemText(QPainter *painter, const QRect& rect, int alignment, const QPalette &pal,
bool enabled, const QString& text, QPalette::ColorRole textRole = QPalette::NoRole) const override;
void drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, QPainter *p,
- const QWidget *w = 0) const override;
+ const QWidget *w = nullptr) const override;
QPixmap generatedIconPixmap(QIcon::Mode iconMode, const QPixmap &pixmap,
const QStyleOption *option) const override;
SubControl hitTestComplexControl(ComplexControl cc, const QStyleOptionComplex *opt,
- const QPoint &pt, const QWidget *w = 0) const override;
+ const QPoint &pt, const QWidget *w = nullptr) const override;
QRect itemPixmapRect(const QRect &rect, int alignment, const QPixmap &pixmap) const override;
QRect itemTextRect(const QFontMetrics &metrics, const QRect &rect, int alignment, bool enabled,
const QString &text) const override;
- int pixelMetric(PixelMetric metric, const QStyleOption *option = 0, const QWidget *widget = 0) const override;
+ int pixelMetric(PixelMetric metric, const QStyleOption *option = nullptr, const QWidget *widget = nullptr) const override;
void polish(QWidget *widget) override;
void polish(QApplication *app) override;
void polish(QPalette &pal) override;
QSize sizeFromContents(ContentsType ct, const QStyleOption *opt,
- const QSize &contentsSize, const QWidget *widget = 0) const override;
+ const QSize &contentsSize, const QWidget *widget = nullptr) const override;
QPalette standardPalette() const override;
- QIcon standardIcon(StandardPixmap standardIcon, const QStyleOption *opt = 0,
- const QWidget *widget = 0) const override;
- QPixmap standardPixmap(StandardPixmap standardPixmap, const QStyleOption *option = 0,
- const QWidget *w = 0 ) const override;
+ QIcon standardIcon(StandardPixmap standardIcon, const QStyleOption *opt = nullptr,
+ const QWidget *widget = nullptr) const override;
+ QPixmap standardPixmap(StandardPixmap standardPixmap, const QStyleOption *option = nullptr,
+ const QWidget *w = nullptr ) const override;
int layoutSpacing(QSizePolicy::ControlType control1, QSizePolicy::ControlType control2,
- Qt::Orientation orientation, const QStyleOption *option = 0,
- const QWidget *widget = 0) const override;
- int styleHint(StyleHint sh, const QStyleOption *opt = 0, const QWidget *w = 0,
- QStyleHintReturn *shret = 0) const override;
- QRect subElementRect(SubElement r, const QStyleOption *opt, const QWidget *widget = 0) const override;
+ Qt::Orientation orientation, const QStyleOption *option = nullptr,
+ const QWidget *widget = nullptr) const override;
+ int styleHint(StyleHint sh, const QStyleOption *opt = nullptr, const QWidget *w = nullptr,
+ QStyleHintReturn *shret = nullptr) const override;
+ QRect subElementRect(SubElement r, const QStyleOption *opt, const QWidget *widget = nullptr) const override;
QRect subControlRect(ComplexControl cc, const QStyleOptionComplex *opt, SubControl sc,
- const QWidget *w = 0) const override;
+ const QWidget *w = nullptr) const override;
// These functions are called from QApplication/QWidget. Be careful.
QStyle *baseStyle() const;
diff --git a/src/widgets/styles/qwindowsstyle_p.h b/src/widgets/styles/qwindowsstyle_p.h
index 47816ff651..b5f0bd68a1 100644
--- a/src/widgets/styles/qwindowsstyle_p.h
+++ b/src/widgets/styles/qwindowsstyle_p.h
@@ -77,25 +77,25 @@ public:
void polish(QPalette &) override;
void drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, QPainter *p,
- const QWidget *w = 0) const override;
+ const QWidget *w = nullptr) const override;
void drawControl(ControlElement element, const QStyleOption *opt, QPainter *p,
- const QWidget *w = 0) const override;
- QRect subElementRect(SubElement r, const QStyleOption *opt, const QWidget *widget = 0) const override;
+ const QWidget *w = nullptr) const override;
+ QRect subElementRect(SubElement r, const QStyleOption *opt, const QWidget *widget = nullptr) const override;
void drawComplexControl(ComplexControl cc, const QStyleOptionComplex *opt, QPainter *p,
- const QWidget *w = 0) const override;
+ const QWidget *w = nullptr) const override;
QSize sizeFromContents(ContentsType ct, const QStyleOption *opt,
- const QSize &contentsSize, const QWidget *widget = 0) const override;
+ const QSize &contentsSize, const QWidget *widget = nullptr) const override;
- int pixelMetric(PixelMetric pm, const QStyleOption *option = 0, const QWidget *widget = 0) const override;
+ int pixelMetric(PixelMetric pm, const QStyleOption *option = nullptr, const QWidget *widget = nullptr) const override;
- int styleHint(StyleHint hint, const QStyleOption *opt = 0, const QWidget *widget = 0,
- QStyleHintReturn *returnData = 0) const override;
+ int styleHint(StyleHint hint, const QStyleOption *opt = nullptr, const QWidget *widget = nullptr,
+ QStyleHintReturn *returnData = nullptr) const override;
QPixmap standardPixmap(StandardPixmap standardPixmap, const QStyleOption *opt,
- const QWidget *widget = 0) const override;
+ const QWidget *widget = nullptr) const override;
- QIcon standardIcon(StandardPixmap standardIcon, const QStyleOption *option = 0,
- const QWidget *widget = 0) const override;
+ QIcon standardIcon(StandardPixmap standardIcon, const QStyleOption *option = nullptr,
+ const QWidget *widget = nullptr) const override;
protected:
bool eventFilter(QObject *o, QEvent *e) override;
diff --git a/src/widgets/styles/qwindowsstyle_p_p.h b/src/widgets/styles/qwindowsstyle_p_p.h
index 67fa6a2f86..e6ea809f11 100644
--- a/src/widgets/styles/qwindowsstyle_p_p.h
+++ b/src/widgets/styles/qwindowsstyle_p_p.h
@@ -69,9 +69,9 @@ public:
enum { InvalidMetric = -23576 };
QWindowsStylePrivate();
- static int pixelMetricFromSystemDp(QStyle::PixelMetric pm, const QStyleOption *option = 0, const QWidget *widget = 0);
+ static int pixelMetricFromSystemDp(QStyle::PixelMetric pm, const QStyleOption *option = nullptr, const QWidget *widget = nullptr);
static int fixedPixelMetric(QStyle::PixelMetric pm);
- static qreal devicePixelRatio(const QWidget *widget = 0)
+ static qreal devicePixelRatio(const QWidget *widget = nullptr)
{ return widget ? widget->devicePixelRatioF() : QWindowsStylePrivate::appDevicePixelRatio(); }
static qreal nativeMetricScaleFactor(const QWidget *widget = nullptr);
diff --git a/src/widgets/util/qcompleter_p.h b/src/widgets/util/qcompleter_p.h
index 21dddf446e..a52e63a6e2 100644
--- a/src/widgets/util/qcompleter_p.h
+++ b/src/widgets/util/qcompleter_p.h
@@ -75,7 +75,7 @@ class QCompleterPrivate : public QObjectPrivate
public:
QCompleterPrivate();
~QCompleterPrivate() { delete popup; }
- void init(QAbstractItemModel *model = 0);
+ void init(QAbstractItemModel *model = nullptr);
QPointer<QWidget> widget;
QCompletionModel *proxy;
diff --git a/src/widgets/util/qflickgesture_p.h b/src/widgets/util/qflickgesture_p.h
index d5ace887ae..0b47516047 100644
--- a/src/widgets/util/qflickgesture_p.h
+++ b/src/widgets/util/qflickgesture_p.h
@@ -71,7 +71,7 @@ class Q_WIDGETS_EXPORT QFlickGesture : public QGesture
Q_DECLARE_PRIVATE(QFlickGesture)
public:
- QFlickGesture(QObject *receiver, Qt::MouseButton button, QObject *parent = 0);
+ QFlickGesture(QObject *receiver, Qt::MouseButton button, QObject *parent = nullptr);
~QFlickGesture();
friend class QFlickGestureRecognizer;
diff --git a/src/widgets/util/qundostack_p.h b/src/widgets/util/qundostack_p.h
index 04bc381114..05c9e0d27e 100644
--- a/src/widgets/util/qundostack_p.h
+++ b/src/widgets/util/qundostack_p.h
@@ -80,7 +80,7 @@ class QUndoStackPrivate : public QObjectPrivate
{
Q_DECLARE_PUBLIC(QUndoStack)
public:
- QUndoStackPrivate() : index(0), clean_index(0), group(0), undo_limit(0) {}
+ QUndoStackPrivate() : index(0), clean_index(0), group(nullptr), undo_limit(0) {}
QList<QUndoCommand*> command_list;
QList<QUndoCommand*> macro_stack;
@@ -98,7 +98,7 @@ class QUndoAction : public QAction
{
Q_OBJECT
public:
- explicit QUndoAction(const QString &prefix, QObject *parent = 0);
+ explicit QUndoAction(const QString &prefix, QObject *parent = nullptr);
void setTextFormat(const QString &textFormat, const QString &defaultText);
public Q_SLOTS:
void setPrefixedText(const QString &text);
diff --git a/src/widgets/widgets/qabstractslider_p.h b/src/widgets/widgets/qabstractslider_p.h
index 419ce2ba07..1b8c76c7ec 100644
--- a/src/widgets/widgets/qabstractslider_p.h
+++ b/src/widgets/widgets/qabstractslider_p.h
@@ -134,7 +134,7 @@ public:
inline void setAdjustedSliderPosition(int position)
{
Q_Q(QAbstractSlider);
- if (q->style()->styleHint(QStyle::SH_Slider_StopMouseOverSlider, 0, q)) {
+ if (q->style()->styleHint(QStyle::SH_Slider_StopMouseOverSlider, nullptr, q)) {
if ((position > pressValue - 2 * pageStep) && (position < pressValue + 2 * pageStep)) {
repeatAction = QAbstractSlider::SliderNoAction;
q->setSliderPosition(pressValue);
diff --git a/src/widgets/widgets/qabstractspinbox_p.h b/src/widgets/widgets/qabstractspinbox_p.h
index fce88e43f4..ad169fde19 100644
--- a/src/widgets/widgets/qabstractspinbox_p.h
+++ b/src/widgets/widgets/qabstractspinbox_p.h
@@ -97,7 +97,7 @@ public:
void init();
void reset();
void updateState(bool up, bool fromKeyboard = false);
- QString stripped(const QString &text, int *pos = 0) const;
+ QString stripped(const QString &text, int *pos = nullptr) const;
bool specialValue() const;
virtual QVariant getZeroVariant() const;
virtual void setRange(const QVariant &min, const QVariant &max);
diff --git a/src/widgets/widgets/qcombobox_p.h b/src/widgets/widgets/qcombobox_p.h
index 71404964da..eadb21628f 100644
--- a/src/widgets/widgets/qcombobox_p.h
+++ b/src/widgets/widgets/qcombobox_p.h
@@ -86,7 +86,7 @@ class QComboBoxListView : public QListView
{
Q_OBJECT
public:
- QComboBoxListView(QComboBox *cmb = 0) : combo(cmb) {}
+ QComboBoxListView(QComboBox *cmb = nullptr) : combo(cmb) {}
protected:
void resizeEvent(QResizeEvent *event) override
@@ -331,7 +331,7 @@ protected:
QSize sizeHint(const QStyleOptionViewItem &option,
const QModelIndex &index) const override {
if (isSeparator(index)) {
- int pm = mCombo->style()->pixelMetric(QStyle::PM_DefaultFrameWidth, 0, mCombo);
+ int pm = mCombo->style()->pixelMetric(QStyle::PM_DefaultFrameWidth, nullptr, mCombo);
return QSize(pm, pm);
}
return QItemDelegate::sizeHint(option, index);
diff --git a/src/widgets/widgets/qdatetimeedit_p.h b/src/widgets/widgets/qdatetimeedit_p.h
index 1ebc98dedf..c05e7d9b48 100644
--- a/src/widgets/widgets/qdatetimeedit_p.h
+++ b/src/widgets/widgets/qdatetimeedit_p.h
@@ -123,7 +123,7 @@ public:
static QDateTimeEdit::Sections convertSections(QDateTimeParser::Sections s);
static QDateTimeEdit::Section convertToPublic(QDateTimeParser::Section s);
- void initCalendarPopup(QCalendarWidget *cw = 0);
+ void initCalendarPopup(QCalendarWidget *cw = nullptr);
void positionCalendarPopup();
QDateTimeEdit::Sections sections;
@@ -145,7 +145,7 @@ class QCalendarPopup : public QWidget
{
Q_OBJECT
public:
- explicit QCalendarPopup(QWidget *parent = 0, QCalendarWidget *cw = 0);
+ explicit QCalendarPopup(QWidget *parent = nullptr, QCalendarWidget *cw = nullptr);
QDate selectedDate() { return verifyCalendarInstance()->selectedDate(); }
void setDate(const QDate &date);
void setDateRange(const QDate &min, const QDate &max);
diff --git a/src/widgets/widgets/qdockarealayout_p.h b/src/widgets/widgets/qdockarealayout_p.h
index 49bd157179..ab9c0c476c 100644
--- a/src/widgets/widgets/qdockarealayout_p.h
+++ b/src/widgets/widgets/qdockarealayout_p.h
@@ -89,7 +89,7 @@ struct QDockAreaLayoutItem
{
enum ItemFlags { NoFlags = 0, GapItem = 1, KeepSize = 2 };
- explicit QDockAreaLayoutItem(QLayoutItem *_widgetItem = 0);
+ explicit QDockAreaLayoutItem(QLayoutItem *_widgetItem = nullptr);
explicit QDockAreaLayoutItem(QDockAreaLayoutInfo *_subinfo);
explicit QDockAreaLayoutItem(QPlaceHolderItem *_placeHolderItem);
QDockAreaLayoutItem(const QDockAreaLayoutItem &other);
diff --git a/src/widgets/widgets/qdockwidget_p.h b/src/widgets/widgets/qdockwidget_p.h
index 14d73e815f..2543f10f97 100644
--- a/src/widgets/widgets/qdockwidget_p.h
+++ b/src/widgets/widgets/qdockwidget_p.h
@@ -82,11 +82,11 @@ class QDockWidgetPrivate : public QWidgetPrivate
public:
inline QDockWidgetPrivate()
- : QWidgetPrivate(), state(0),
+ : QWidgetPrivate(), state(nullptr),
features(QDockWidget::DockWidgetClosable
| QDockWidget::DockWidgetMovable
| QDockWidget::DockWidgetFloatable),
- allowedAreas(Qt::AllDockWidgetAreas), resizer(0)
+ allowedAreas(Qt::AllDockWidgetAreas), resizer(nullptr)
{ }
void init();
@@ -136,7 +136,7 @@ class Q_WIDGETS_EXPORT QDockWidgetLayout : public QLayout
{
Q_OBJECT
public:
- QDockWidgetLayout(QWidget *parent = 0);
+ QDockWidgetLayout(QWidget *parent = nullptr);
~QDockWidgetLayout();
void addItem(QLayoutItem *item) override;
QLayoutItem *itemAt(int index) const override;
@@ -194,15 +194,15 @@ inline QLayoutItem *QDockWidgetItem::dockWidgetChildItem() const
{
if (QDockWidgetLayout *layout = dockWidgetLayout())
return layout->itemForRole(QDockWidgetLayout::Content);
- return 0;
+ return nullptr;
}
inline QDockWidgetLayout *QDockWidgetItem::dockWidgetLayout() const
{
QWidget *w = const_cast<QDockWidgetItem*>(this)->widget();
- if (w != 0)
+ if (w != nullptr)
return qobject_cast<QDockWidgetLayout*>(w->layout());
- return 0;
+ return nullptr;
}
QT_END_NAMESPACE
diff --git a/src/widgets/widgets/qlineedit_p.h b/src/widgets/widgets/qlineedit_p.h
index dce5bf605a..3f98aab901 100644
--- a/src/widgets/widgets/qlineedit_p.h
+++ b/src/widgets/widgets/qlineedit_p.h
@@ -85,7 +85,7 @@ class Q_AUTOTEST_EXPORT QLineEditIconButton : public QToolButton
Q_OBJECT
Q_PROPERTY(qreal opacity READ opacity WRITE setOpacity)
public:
- explicit QLineEditIconButton(QWidget *parent = 0);
+ explicit QLineEditIconButton(QWidget *parent = nullptr);
qreal opacity() const { return m_opacity; }
void setOpacity(qreal value);
@@ -134,7 +134,7 @@ public:
};
struct SideWidgetEntry {
- explicit SideWidgetEntry(QWidget *w = 0, QAction *a = 0, int _flags = 0) : widget(w), action(a), flags(_flags) {}
+ explicit SideWidgetEntry(QWidget *w = nullptr, QAction *a = nullptr, int _flags = 0) : widget(w), action(a), flags(_flags) {}
QWidget *widget;
QAction *action;
diff --git a/src/widgets/widgets/qmainwindowlayout_p.h b/src/widgets/widgets/qmainwindowlayout_p.h
index a375d856bb..7cdb8ead2f 100644
--- a/src/widgets/widgets/qmainwindowlayout_p.h
+++ b/src/widgets/widgets/qmainwindowlayout_p.h
@@ -122,7 +122,7 @@ template <typename Layout>
QCursor QMainWindowLayoutSeparatorHelper<Layout>::separatorCursor(const QList<int> &path)
{
const QDockAreaLayoutInfo *info = layout()->dockAreaLayoutInfo()->info(path);
- Q_ASSERT(info != 0);
+ Q_ASSERT(info != nullptr);
if (path.size() == 1) { // is this the "top-level" separator which separates a dock area
// from the central widget?
switch (path.first()) {
@@ -334,7 +334,7 @@ class QDockWidgetGroupWindow : public QWidget
{
Q_OBJECT
public:
- explicit QDockWidgetGroupWindow(QWidget* parent = 0, Qt::WindowFlags f = 0)
+ explicit QDockWidgetGroupWindow(QWidget* parent = nullptr, Qt::WindowFlags f = nullptr)
: QWidget(parent, f) {}
QDockAreaLayoutInfo *layoutInfo() const;
const QDockAreaLayoutInfo *tabLayoutInfo() const;
@@ -430,7 +430,7 @@ public:
bool isValid() const;
QLayoutItem *plug(const QList<int> &path);
- QLayoutItem *unplug(const QList<int> &path, QMainWindowLayoutState *savedState = 0);
+ QLayoutItem *unplug(const QList<int> &path, QMainWindowLayoutState *savedState = nullptr);
void saveState(QDataStream &stream) const;
bool checkFormat(QDataStream &stream);
diff --git a/src/widgets/widgets/qmdiarea_p.h b/src/widgets/widgets/qmdiarea_p.h
index fd00118ec6..0a6368044a 100644
--- a/src/widgets/widgets/qmdiarea_p.h
+++ b/src/widgets/widgets/qmdiarea_p.h
@@ -183,7 +183,7 @@ public:
int tabToPreviousTimerId;
// Slots.
- void _q_deactivateAllWindows(QMdiSubWindow *aboutToActivate = 0);
+ void _q_deactivateAllWindows(QMdiSubWindow *aboutToActivate = nullptr);
void _q_processWindowStateChanged(Qt::WindowStates oldState, Qt::WindowStates newState);
void _q_currentTabChanged(int index);
void _q_closeTab(int index);
@@ -198,7 +198,7 @@ public:
void activateCurrentWindow();
void activateHighlightedWindow();
void emitWindowActivated(QMdiSubWindow *child);
- void resetActiveWindow(QMdiSubWindow *child = 0);
+ void resetActiveWindow(QMdiSubWindow *child = nullptr);
void updateActiveWindow(int removedIndex, bool activeRemoved);
void updateScrollBars();
void internalRaise(QMdiSubWindow *child) const;
diff --git a/src/widgets/widgets/qmdisubwindow_p.h b/src/widgets/widgets/qmdisubwindow_p.h
index 719984c8d4..d3513b6708 100644
--- a/src/widgets/widgets/qmdisubwindow_p.h
+++ b/src/widgets/widgets/qmdisubwindow_p.h
@@ -78,7 +78,7 @@ template<typename T>
class ControlElement : public T
{
public:
- ControlElement(QMdiSubWindow *child) : T(child, 0)
+ ControlElement(QMdiSubWindow *child) : T(child, nullptr)
{
Q_ASSERT(child);
mdiChild = child;
@@ -88,7 +88,7 @@ public:
{
if (classname && strcmp(classname, "ControlElement") == 0)
return this;
- return 0;
+ return nullptr;
}
QPointer<QMdiSubWindow> mdiChild;
@@ -102,7 +102,7 @@ public:
#if QT_CONFIG(menubar)
void showButtonsInMenuBar(QMenuBar *menuBar);
- void removeButtonsFromMenuBar(QMenuBar *menuBar = 0);
+ void removeButtonsFromMenuBar(QMenuBar *menuBar = nullptr);
QMenuBar *menuBar() const { return m_menuBar; }
#endif
void updateWindowIcon(const QIcon &windowIcon);
@@ -331,7 +331,7 @@ public:
inline bool autoRaise() const
{
Q_Q(const QMdiSubWindow);
- return q->style()->styleHint(QStyle::SH_TitleBar_AutoRaise, 0, q);
+ return q->style()->styleHint(QStyle::SH_TitleBar_AutoRaise, nullptr, q);
}
inline bool isResizeOperation() const
diff --git a/src/widgets/widgets/qmenu_p.h b/src/widgets/widgets/qmenu_p.h
index 12521e7a36..0fd0f9219c 100644
--- a/src/widgets/widgets/qmenu_p.h
+++ b/src/widgets/widgets/qmenu_p.h
@@ -135,9 +135,9 @@ public:
void initialize(QMenu *menu)
{
m_menu = menu;
- m_uni_directional = menu->style()->styleHint(QStyle::SH_Menu_SubMenuUniDirection, 0, menu);
- m_uni_dir_fail_at_count = short(menu->style()->styleHint(QStyle::SH_Menu_SubMenuUniDirectionFailCount, 0, menu));
- m_select_other_actions = menu->style()->styleHint(QStyle::SH_Menu_SubMenuSloppySelectOtherActions, 0 , menu);
+ m_uni_directional = menu->style()->styleHint(QStyle::SH_Menu_SubMenuUniDirection, nullptr, menu);
+ m_uni_dir_fail_at_count = short(menu->style()->styleHint(QStyle::SH_Menu_SubMenuUniDirectionFailCount, nullptr, menu));
+ m_select_other_actions = menu->style()->styleHint(QStyle::SH_Menu_SubMenuSloppySelectOtherActions, nullptr , menu);
m_timeout = short(menu->style()->styleHint(QStyle::SH_Menu_SubMenuSloppyCloseTimeout));
m_discard_state_when_entering_parent = menu->style()->styleHint(QStyle::SH_Menu_SubMenuResetWhenReenteringParent);
m_dont_start_time_on_leave = menu->style()->styleHint(QStyle::SH_Menu_SubMenuDontStartSloppyOnLeave);
@@ -377,7 +377,7 @@ public:
}
void stop()
{
- action = 0;
+ action = nullptr;
timer.stop();
}
diff --git a/src/widgets/widgets/qmenubar_p.h b/src/widgets/widgets/qmenubar_p.h
index c276a4512d..e3db16d190 100644
--- a/src/widgets/widgets/qmenubar_p.h
+++ b/src/widgets/widgets/qmenubar_p.h
@@ -65,9 +65,9 @@ class QMenuBarPrivate : public QWidgetPrivate
{
Q_DECLARE_PUBLIC(QMenuBar)
public:
- QMenuBarPrivate() : itemsDirty(0), currentAction(0), mouseDown(0),
+ QMenuBarPrivate() : itemsDirty(0), currentAction(nullptr), mouseDown(0),
closePopupMode(0), defaultPopDown(1), popupState(0), keyboardState(0), altPressed(0),
- doChildEffects(false), platformMenuBar(0)
+ doChildEffects(false), platformMenuBar(nullptr)
{ }
~QMenuBarPrivate()
diff --git a/src/widgets/widgets/qscrollarea_p.h b/src/widgets/widgets/qscrollarea_p.h
index fa2e0241cf..2bdf9ed596 100644
--- a/src/widgets/widgets/qscrollarea_p.h
+++ b/src/widgets/widgets/qscrollarea_p.h
@@ -65,7 +65,7 @@ class QScrollAreaPrivate: public QAbstractScrollAreaPrivate
Q_DECLARE_PUBLIC(QScrollArea)
public:
- QScrollAreaPrivate(): resizable(false), alignment(0){}
+ QScrollAreaPrivate(): resizable(false), alignment(nullptr){}
void updateScrollBars();
void updateWidgetPosition();
QPointer<QWidget> widget;
diff --git a/src/widgets/widgets/qsplitter_p.h b/src/widgets/widgets/qsplitter_p.h
index f0d621004f..871406a51d 100644
--- a/src/widgets/widgets/qsplitter_p.h
+++ b/src/widgets/widgets/qsplitter_p.h
@@ -70,7 +70,7 @@ public:
QWidget *widget;
QSplitterHandle *handle;
- QSplitterLayoutStruct() : sizer(-1), collapsed(false), collapsible(Default), widget(0), handle(0) {}
+ QSplitterLayoutStruct() : sizer(-1), collapsed(false), collapsible(Default), widget(nullptr), handle(nullptr) {}
~QSplitterLayoutStruct() { delete handle; }
int getWidgetSize(Qt::Orientation orient);
int getHandleSize(Qt::Orientation orient);
@@ -84,7 +84,7 @@ class QSplitterPrivate : public QFramePrivate
public:
QSplitterPrivate() :
#if QT_CONFIG(rubberband)
- rubberBand(0),
+ rubberBand(nullptr),
#endif
opaque(true), firstShow(true),
childrenCollapsible(true), compatMode(false), handleWidth(-1), blockChildAdd(false), opaqueResizeSet(false) {}
@@ -140,7 +140,7 @@ class QSplitterHandlePrivate : public QWidgetPrivate
{
Q_DECLARE_PUBLIC(QSplitterHandle)
public:
- QSplitterHandlePrivate() : s(0), orient(Qt::Horizontal), mouseOffset(0), opaq(false), hover(false), pressed(false) {}
+ QSplitterHandlePrivate() : s(nullptr), orient(Qt::Horizontal), mouseOffset(0), opaq(false), hover(false), pressed(false) {}
inline int pick(const QPoint &pos) const
{ return orient == Qt::Horizontal ? pos.x() : pos.y(); }
diff --git a/src/widgets/widgets/qtabbar_p.h b/src/widgets/widgets/qtabbar_p.h
index 9b798e89c9..458d486b10 100644
--- a/src/widgets/widgets/qtabbar_p.h
+++ b/src/widgets/widgets/qtabbar_p.h
@@ -92,7 +92,7 @@ public:
drawBase(true), scrollOffset(0), hoverIndex(-1), elideModeSetByUser(false), useScrollButtonsSetByUser(false), expanding(true), closeButtonOnTabs(false),
selectionBehaviorOnRemove(QTabBar::SelectRightTab), paintWithOffsets(true), movable(false),
dragInProgress(false), documentMode(false), autoHide(false), changeCurrentOnDrag(false),
- switchTabCurrentIndex(-1), switchTabTimerId(0), movingTab(0)
+ switchTabCurrentIndex(-1), switchTabTimerId(0), movingTab(nullptr)
#if 0 // Used to be included in Qt4 for Q_WS_MAC
, previousPressedIndex(-1)
#endif
@@ -182,7 +182,7 @@ public:
int indexAtPos(const QPoint &p) const;
- inline bool isAnimated() const { Q_Q(const QTabBar); return q->style()->styleHint(QStyle::SH_Widget_Animation_Duration, 0, q) > 0; }
+ inline bool isAnimated() const { Q_Q(const QTabBar); return q->style()->styleHint(QStyle::SH_Widget_Animation_Duration, nullptr, q) > 0; }
inline bool validIndex(int index) const { return index >= 0 && index < tabList.count(); }
void setCurrentNextEnabledIndex(int offset);
diff --git a/src/widgets/widgets/qtoolbar_p.h b/src/widgets/widgets/qtoolbar_p.h
index 4db75762c8..8cb5850903 100644
--- a/src/widgets/widgets/qtoolbar_p.h
+++ b/src/widgets/widgets/qtoolbar_p.h
@@ -73,7 +73,7 @@ public:
: explicitIconSize(false), explicitToolButtonStyle(false), movable(true), floatable(true),
allowedAreas(Qt::AllToolBarAreas), orientation(Qt::Horizontal),
toolButtonStyle(Qt::ToolButtonIconOnly),
- layout(0), state(0)
+ layout(nullptr), state(nullptr)
#ifdef Q_OS_OSX
, macWindowDragging(false)
#endif
diff --git a/src/widgets/widgets/qtoolbararealayout_p.h b/src/widgets/widgets/qtoolbararealayout_p.h
index 17747ef29b..5df95a3038 100644
--- a/src/widgets/widgets/qtoolbararealayout_p.h
+++ b/src/widgets/widgets/qtoolbararealayout_p.h
@@ -69,7 +69,7 @@ class QStyleOptionToolBar;
class QToolBarAreaLayoutItem
{
public:
- QToolBarAreaLayoutItem(QLayoutItem *item = 0)
+ QToolBarAreaLayoutItem(QLayoutItem *item = nullptr)
: widgetItem(item), pos(0), size(-1), preferredSize(-1), gap(false) {}
bool skip() const;
diff --git a/src/widgets/widgets/qtoolbarlayout_p.h b/src/widgets/widgets/qtoolbarlayout_p.h
index a788d30450..b5dc121b93 100644
--- a/src/widgets/widgets/qtoolbarlayout_p.h
+++ b/src/widgets/widgets/qtoolbarlayout_p.h
@@ -79,7 +79,7 @@ class QToolBarLayout : public QLayout
Q_OBJECT
public:
- QToolBarLayout(QWidget *parent = 0);
+ QToolBarLayout(QWidget *parent = nullptr);
~QToolBarLayout();
void addItem(QLayoutItem *item) override;
diff --git a/src/widgets/widgets/qwidgetlinecontrol_p.h b/src/widgets/widgets/qwidgetlinecontrol_p.h
index f4df95865d..940a17714f 100644
--- a/src/widgets/widgets/qwidgetlinecontrol_p.h
+++ b/src/widgets/widgets/qwidgetlinecontrol_p.h
@@ -91,7 +91,7 @@ public:
m_dragEnabled(0), m_echoMode(0), m_textDirty(0), m_selDirty(0),
m_validInput(1), m_blinkStatus(0), m_blinkEnabled(false), m_blinkTimer(0), m_deleteAllTimer(0),
m_ascent(0), m_maxLength(32767), m_lastCursorPos(-1),
- m_tripleClickTimer(0), m_maskData(0), m_modifiedState(0), m_undoState(0),
+ m_tripleClickTimer(0), m_maskData(nullptr), m_modifiedState(0), m_undoState(0),
m_selstart(0), m_selend(0), m_passwordEchoEditing(false)
, m_passwordEchoTimer(0)
, m_passwordMaskDelay(-1)
@@ -103,7 +103,7 @@ public:
, m_passwordMaskDelayOverride(-1)
#endif
, m_keyboardScheme(0)
- , m_accessibleObject(0)
+ , m_accessibleObject(nullptr)
{
init(txt);
}
diff --git a/src/widgets/widgets/qwidgetresizehandler_p.h b/src/widgets/widgets/qwidgetresizehandler_p.h
index 89bc759cc2..df3ac7cb8a 100644
--- a/src/widgets/widgets/qwidgetresizehandler_p.h
+++ b/src/widgets/widgets/qwidgetresizehandler_p.h
@@ -73,7 +73,7 @@ public:
Any = Move|Resize
};
- explicit QWidgetResizeHandler(QWidget *parent, QWidget *cw = 0);
+ explicit QWidgetResizeHandler(QWidget *parent, QWidget *cw = nullptr);
void setActive(bool b) { setActive(Any, b); }
void setActive(Action ac, bool b);
bool isActive() const { return isActive(Any); }
diff --git a/src/widgets/widgets/qwidgettextcontrol_p.h b/src/widgets/widgets/qwidgettextcontrol_p.h
index 202ba36454..9c80d53728 100644
--- a/src/widgets/widgets/qwidgettextcontrol_p.h
+++ b/src/widgets/widgets/qwidgettextcontrol_p.h
@@ -97,9 +97,9 @@ class Q_WIDGETS_EXPORT QWidgetTextControl : public QInputControl
Q_PROPERTY(bool openExternalLinks READ openExternalLinks WRITE setOpenExternalLinks)
Q_PROPERTY(bool ignoreUnusedNavigationEvents READ ignoreUnusedNavigationEvents WRITE setIgnoreUnusedNavigationEvents)
public:
- explicit QWidgetTextControl(QObject *parent = 0);
- explicit QWidgetTextControl(const QString &text, QObject *parent = 0);
- explicit QWidgetTextControl(QTextDocument *doc, QObject *parent = 0);
+ explicit QWidgetTextControl(QObject *parent = nullptr);
+ explicit QWidgetTextControl(const QString &text, QObject *parent = nullptr);
+ explicit QWidgetTextControl(QTextDocument *doc, QObject *parent = nullptr);
virtual ~QWidgetTextControl();
void setDocument(QTextDocument *document);
@@ -116,12 +116,12 @@ public:
void setCurrentCharFormat(const QTextCharFormat &format);
QTextCharFormat currentCharFormat() const;
- bool find(const QString &exp, QTextDocument::FindFlags options = 0);
+ bool find(const QString &exp, QTextDocument::FindFlags options = nullptr);
#ifndef QT_NO_REGEXP
- bool find(const QRegExp &exp, QTextDocument::FindFlags options = 0);
+ bool find(const QRegExp &exp, QTextDocument::FindFlags options = nullptr);
#endif
#if QT_CONFIG(regularexpression)
- bool find(const QRegularExpression &exp, QTextDocument::FindFlags options = 0);
+ bool find(const QRegularExpression &exp, QTextDocument::FindFlags options = nullptr);
#endif
QString toPlainText() const;
@@ -243,11 +243,11 @@ public:
QPalette palette() const;
void setPalette(const QPalette &pal);
- virtual void processEvent(QEvent *e, const QMatrix &matrix, QWidget *contextWidget = 0);
- void processEvent(QEvent *e, const QPointF &coordinateOffset = QPointF(), QWidget *contextWidget = 0);
+ virtual void processEvent(QEvent *e, const QMatrix &matrix, QWidget *contextWidget = nullptr);
+ void processEvent(QEvent *e, const QPointF &coordinateOffset = QPointF(), QWidget *contextWidget = nullptr);
// control methods
- void drawContents(QPainter *painter, const QRectF &rect = QRectF(), QWidget *widget = 0);
+ void drawContents(QPainter *painter, const QRectF &rect = QRectF(), QWidget *widget = nullptr);
void setFocus(bool focus, Qt::FocusReason = Qt::OtherFocusReason);
diff --git a/src/widgets/widgets/qwidgettextcontrol_p_p.h b/src/widgets/widgets/qwidgettextcontrol_p_p.h
index 232dab180f..6a1ee564cd 100644
--- a/src/widgets/widgets/qwidgettextcontrol_p_p.h
+++ b/src/widgets/widgets/qwidgettextcontrol_p_p.h
@@ -89,9 +89,9 @@ public:
void createAutoBulletList();
void init(Qt::TextFormat format = Qt::RichText, const QString &text = QString(),
- QTextDocument *document = 0);
+ QTextDocument *document = nullptr);
void setContent(Qt::TextFormat format = Qt::RichText, const QString &text = QString(),
- QTextDocument *document = 0);
+ QTextDocument *document = nullptr);
void startDrag();
void paste(const QMimeData *source);