Prefer nullptr over Q_NULLPTR
This commit is contained in:
parent
7d3d68a3c8
commit
f8a7b418d5
@ -39,7 +39,7 @@ class EventDataDecorator : public QObject
|
||||
Q_PROPERTY(QString eventType READ eventType NOTIFY eventDataChanged)
|
||||
|
||||
public:
|
||||
EventDataDecorator(const CalendarEvents::EventData &data, QObject *parent = Q_NULLPTR);
|
||||
EventDataDecorator(const CalendarEvents::EventData &data, QObject *parent = nullptr);
|
||||
|
||||
QDateTime startDateTime() const;
|
||||
QDateTime endDateTime() const;
|
||||
|
@ -448,7 +448,7 @@ QSGNode *FrameSvgItem::updatePaintNode(QSGNode *oldNode, QQuickItem::UpdatePaint
|
||||
if (!window() || !m_frameSvg ||
|
||||
(!m_frameSvg->hasElementPrefix(m_frameSvg->actualPrefix()) && !m_frameSvg->hasElementPrefix(m_prefix))) {
|
||||
delete oldNode;
|
||||
return Q_NULLPTR;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
if (m_fastPath) {
|
||||
|
@ -375,7 +375,7 @@ QSGNode* IconItem::updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *update
|
||||
|
||||
if (m_iconPixmap.isNull() || width() == 0 || height() == 0) {
|
||||
delete oldNode;
|
||||
return Q_NULLPTR;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
if (m_animation->state() == QAbstractAnimation::Running) {
|
||||
|
@ -134,13 +134,13 @@ QSGNode *SvgItem::updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *updateP
|
||||
Q_UNUSED(updatePaintNodeData);
|
||||
if (!window() || !m_svg) {
|
||||
delete oldNode;
|
||||
return Q_NULLPTR;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
//this is more than just an optimisation, uploading a null image to QSGAtlasTexture causes a crash
|
||||
if (width() == 0 || height() == 0) {
|
||||
delete oldNode;
|
||||
return Q_NULLPTR;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
ManagedTextureNode *textureNode = static_cast<ManagedTextureNode *>(oldNode);
|
||||
@ -160,7 +160,7 @@ QSGNode *SvgItem::updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *updateP
|
||||
//Dave E fixed this in Qt in 5.3.something onwards but we need this for now
|
||||
if (m_image.isNull()) {
|
||||
delete textureNode;
|
||||
return Q_NULLPTR;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
QSharedPointer<QSGTexture> texture(window()->createTextureFromImage(m_image, QQuickWindow::TextureCanUseAtlas));
|
||||
|
@ -133,7 +133,7 @@ void ToolTip::showToolTip()
|
||||
}
|
||||
|
||||
// Unset the dialog's old contents before reparenting the dialog.
|
||||
dlg->setMainItem(Q_NULLPTR);
|
||||
dlg->setMainItem(nullptr);
|
||||
|
||||
Plasma::Types::Location location = m_location;
|
||||
if (m_location == Plasma::Types::Floating) {
|
||||
|
@ -34,7 +34,7 @@ ToolTipDialog::ToolTipDialog(QQuickItem *parent)
|
||||
m_qmlObject(0),
|
||||
m_hideTimeout(4000),
|
||||
m_interactive(false),
|
||||
m_owner(Q_NULLPTR)
|
||||
m_owner(nullptr)
|
||||
{
|
||||
Qt::WindowFlags flags = Qt::ToolTip;
|
||||
if (KWindowSystem::isPlatformX11()) {
|
||||
|
@ -145,15 +145,15 @@ WindowThumbnail::WindowThumbnail(QQuickItem *parent)
|
||||
, m_texture(0)
|
||||
#if HAVE_GLX
|
||||
, m_glxPixmap(XCB_PIXMAP_NONE)
|
||||
, m_bindTexImage(Q_NULLPTR)
|
||||
, m_releaseTexImage(Q_NULLPTR)
|
||||
, m_bindTexImage(nullptr)
|
||||
, m_releaseTexImage(nullptr)
|
||||
#endif // HAVE_GLX
|
||||
#if HAVE_EGL
|
||||
, m_eglFunctionsResolved(false)
|
||||
, m_image(EGL_NO_IMAGE_KHR)
|
||||
, m_eglCreateImageKHR(Q_NULLPTR)
|
||||
, m_eglDestroyImageKHR(Q_NULLPTR)
|
||||
, m_glEGLImageTargetTexture2DOES(Q_NULLPTR)
|
||||
, m_eglCreateImageKHR(nullptr)
|
||||
, m_eglDestroyImageKHR(nullptr)
|
||||
, m_glEGLImageTargetTexture2DOES(nullptr)
|
||||
#endif // HAVE_EGL
|
||||
#endif
|
||||
{
|
||||
@ -391,7 +391,7 @@ bool WindowThumbnail::windowToTextureGLX(WindowTextureNode *textureNode)
|
||||
if (m_glxPixmap == XCB_PIXMAP_NONE) {
|
||||
xcb_connection_t *c = QX11Info::connection();
|
||||
auto geometryCookie = xcb_get_geometry_unchecked(c, m_pixmap);
|
||||
QScopedPointer<xcb_get_geometry_reply_t, QScopedPointerPodDeleter> geo(xcb_get_geometry_reply(c, geometryCookie, Q_NULLPTR));
|
||||
QScopedPointer<xcb_get_geometry_reply_t, QScopedPointerPodDeleter> geo(xcb_get_geometry_reply(c, geometryCookie, nullptr));
|
||||
|
||||
if (geo.isNull()) {
|
||||
return false;
|
||||
@ -445,7 +445,7 @@ bool WindowThumbnail::xcbWindowToTextureEGL(WindowTextureNode *textureNode)
|
||||
}
|
||||
|
||||
glGenTextures(1, &m_texture);
|
||||
QScopedPointer<xcb_get_geometry_reply_t, QScopedPointerPodDeleter> geo(xcb_get_geometry_reply(c, geometryCookie, Q_NULLPTR));
|
||||
QScopedPointer<xcb_get_geometry_reply_t, QScopedPointerPodDeleter> geo(xcb_get_geometry_reply(c, geometryCookie, nullptr));
|
||||
QSize size;
|
||||
if (!geo.isNull()) {
|
||||
size.setWidth(geo->width);
|
||||
@ -589,13 +589,13 @@ GLXFBConfig *getConfig(int depth, int *index)
|
||||
};
|
||||
|
||||
if (QByteArray((char *)glGetString(GL_RENDERER)).contains("llvmpipe")) {
|
||||
return Q_NULLPTR;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
int count = 0;
|
||||
GLXFBConfig *fbConfigs = glXChooseFBConfig(QX11Info::display(), QX11Info::appScreen(), attribs, &count);
|
||||
if (count < 1) {
|
||||
return Q_NULLPTR;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
for (int i = 0; i < count; ++i) {
|
||||
@ -738,7 +738,7 @@ void WindowThumbnail::startRedirecting()
|
||||
m_damage = xcb_generate_id(c);
|
||||
xcb_damage_create(c, m_damage, m_winId, XCB_DAMAGE_REPORT_LEVEL_NON_EMPTY);
|
||||
|
||||
QScopedPointer<xcb_get_window_attributes_reply_t, QScopedPointerPodDeleter> attr(xcb_get_window_attributes_reply(c, attribsCookie, Q_NULLPTR));
|
||||
QScopedPointer<xcb_get_window_attributes_reply_t, QScopedPointerPodDeleter> attr(xcb_get_window_attributes_reply(c, attribsCookie, nullptr));
|
||||
uint32_t events = XCB_EVENT_MASK_STRUCTURE_NOTIFY;
|
||||
if (!attr.isNull()) {
|
||||
events = events | attr->your_event_mask;
|
||||
|
@ -28,7 +28,7 @@
|
||||
#include "plasmacomponentsplugin.h"
|
||||
QMenuProxy::QMenuProxy(QObject *parent)
|
||||
: QObject(parent),
|
||||
m_menu(Q_NULLPTR),
|
||||
m_menu(nullptr),
|
||||
m_status(DialogStatus::Closed),
|
||||
m_placement(Plasma::Types::LeftPosedTopAlignedPopup)
|
||||
{
|
||||
@ -110,7 +110,7 @@ void QMenuProxy::setVisualParent(QObject *parent)
|
||||
QWindow *QMenuProxy::transientParent()
|
||||
{
|
||||
if (!m_menu) {
|
||||
return Q_NULLPTR;
|
||||
return nullptr;
|
||||
}
|
||||
return m_menu->windowHandle()->transientParent();
|
||||
}
|
||||
|
@ -52,7 +52,7 @@ class Application: public QObject
|
||||
Q_PROPERTY(bool running READ running WRITE setRunning NOTIFY runningChanged)
|
||||
|
||||
public:
|
||||
Application(QObject *parent = Q_NULLPTR);
|
||||
Application(QObject *parent = nullptr);
|
||||
~Application();
|
||||
|
||||
QString application() const;
|
||||
|
@ -46,7 +46,7 @@ class IconDialog: public QObject
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
IconDialog(QObject *parent = Q_NULLPTR);
|
||||
IconDialog(QObject *parent = nullptr);
|
||||
~IconDialog();
|
||||
|
||||
Q_INVOKABLE QString openDialog();
|
||||
|
@ -30,7 +30,7 @@ class PlatformComponentsPlugin: public QQmlExtensionPlugin
|
||||
Q_PLUGIN_METADATA(IID "org.kde.plasma.platformcomponents")
|
||||
|
||||
public:
|
||||
PlatformComponentsPlugin(QObject *parent = Q_NULLPTR)
|
||||
PlatformComponentsPlugin(QObject *parent = nullptr)
|
||||
: QQmlExtensionPlugin(parent)
|
||||
{
|
||||
}
|
||||
|
@ -68,8 +68,8 @@ AppletPrivate::AppletPrivate(const KPluginMetaData &info, int uniqueID, Applet *
|
||||
actions(AppletPrivate::defaultActions(applet)),
|
||||
activationAction(0),
|
||||
itemStatus(Types::UnknownStatus),
|
||||
modificationsTimer(Q_NULLPTR),
|
||||
deleteNotificationTimer(Q_NULLPTR),
|
||||
modificationsTimer(nullptr),
|
||||
deleteNotificationTimer(nullptr),
|
||||
hasConfigurationInterface(false),
|
||||
failed(false),
|
||||
transient(false),
|
||||
|
@ -42,7 +42,7 @@ const char ThemePrivate::themeRcFile[] = "plasmarc";
|
||||
// these svgs do not follow the theme's colors, but rather the system colors
|
||||
const char ThemePrivate::systemColorsTheme[] = "internal-system-colors";
|
||||
#if HAVE_X11
|
||||
EffectWatcher *ThemePrivate::s_backgroundContrastEffectWatcher = Q_NULLPTR;
|
||||
EffectWatcher *ThemePrivate::s_backgroundContrastEffectWatcher = nullptr;
|
||||
#endif
|
||||
|
||||
ThemePrivate *ThemePrivate::globalTheme = 0;
|
||||
|
@ -549,7 +549,7 @@ void DialogPrivate::updateInputShape()
|
||||
if (extension->present) {
|
||||
// query version
|
||||
auto cookie = xcb_shape_query_version(c);
|
||||
QScopedPointer<xcb_shape_query_version_reply_t, QScopedPointerPodDeleter> version(xcb_shape_query_version_reply(c, cookie, Q_NULLPTR));
|
||||
QScopedPointer<xcb_shape_query_version_reply_t, QScopedPointerPodDeleter> version(xcb_shape_query_version_reply(c, cookie, nullptr));
|
||||
if (!version.isNull()) {
|
||||
s_shapeAvailable = (version->major_version * 0x10 + version->minor_version) >= 0x11;
|
||||
}
|
||||
|
@ -238,7 +238,7 @@ void ContainmentInterface::setAppletArgs(Plasma::Applet *applet, const QString &
|
||||
|
||||
QObject *ContainmentInterface::containmentAt(int x, int y)
|
||||
{
|
||||
QObject *desktop = Q_NULLPTR;
|
||||
QObject *desktop = nullptr;
|
||||
foreach (Plasma::Containment *c, m_containment->corona()->containments()) {
|
||||
ContainmentInterface *contInterface = c->property("_plasma_graphicObject").value<ContainmentInterface *>();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user