[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [libkscreen] /: Use nullptr
From:       Friedrich W. H. Kossebau <null () kde ! org>
Date:       2018-07-02 21:45:51
Message-ID: E1fa6dr-0005ko-7T () code ! kde ! org
[Download RAW message or body]

Git commit 51fad4d64c451d91001821d31931588c5b888ab1 by Friedrich W. H. Kossebau.
Committed on 02/07/2018 at 20:49.
Pushed by kossebau into branch 'master'.

Use nullptr

M  +1    -1    autotests/testkwaylandbackend.cpp
M  +1    -1    autotests/testqscreenbackend.cpp
M  +1    -1    backends/kwayland/waylandbackend.cpp
M  +2    -2    backends/qscreen/qscreenbackend.cpp
M  +1    -1    backends/qscreen/qscreenconfig.h
M  +1    -1    backends/qscreen/qscreenoutput.cpp
M  +1    -1    backends/qscreen/qscreenoutput.h
M  +3    -3    backends/xcbeventlistener.cpp
M  +4    -4    backends/xcbwrapper.cpp
M  +6    -6    backends/xcbwrapper.h
M  +13   -13   backends/xrandr/xrandr.cpp
M  +4    -4    backends/xrandr/xrandrconfig.cpp
M  +4    -4    backends/xrandr/xrandroutput.cpp
M  +1    -1    backends/xrandr/xrandrscreen.h
M  +2    -2    backends/xrandr1.1/xrandr11.cpp
M  +3    -3    src/backendmanager.cpp
M  +1    -1    src/configoperation.h
M  +4    -4    src/output.cpp
M  +1    -1    src/screen.cpp
M  +1    -1    tests/kwayland/waylandtestserver.h
M  +1    -1    tests/testpnp.h

https://commits.kde.org/libkscreen/51fad4d64c451d91001821d31931588c5b888ab1

diff --git a/autotests/testkwaylandbackend.cpp b/autotests/testkwaylandbackend.cpp
index e6bdf48..65c56e0 100644
--- a/autotests/testkwaylandbackend.cpp
+++ b/autotests/testkwaylandbackend.cpp
@@ -150,7 +150,7 @@ void testWaylandBackend::verifyOutputs()
         QVERIFY(output->geometry() != QRectF(1,1,1,1));
         QVERIFY(output->geometry() != QRectF());
         QVERIFY(output->sizeMm() != QSize());
-        QVERIFY(output->edid() != 0);
+        QVERIFY(output->edid() != nullptr);
         QVERIFY(output->preferredModes().size() == 1);
         QCOMPARE(output->rotation(), Output::None);
         QVERIFY(!ids.contains(output->id()));
diff --git a/autotests/testqscreenbackend.cpp b/autotests/testqscreenbackend.cpp
index a8d3ccf..5ecba6e 100644
--- a/autotests/testqscreenbackend.cpp
+++ b/autotests/testqscreenbackend.cpp
@@ -135,7 +135,7 @@ void testQScreenBackend::verifyOutputs()
             QEXPECT_FAIL("", "The X server doesn't return a sensible physical output \
size", Continue);  QVERIFY(output->sizeMm() != QSize());
         }
-        QVERIFY(output->edid() != 0);
+        QVERIFY(output->edid() != nullptr);
         QCOMPARE(output->rotation(), Output::None);
         QVERIFY(!ids.contains(output->id()));
         ids << output->id();
diff --git a/backends/kwayland/waylandbackend.cpp \
b/backends/kwayland/waylandbackend.cpp index 298281f..5a5f64a 100644
--- a/backends/kwayland/waylandbackend.cpp
+++ b/backends/kwayland/waylandbackend.cpp
@@ -91,6 +91,6 @@ bool WaylandBackend::isValid() const
 
 void WaylandBackend::updateConfig(ConfigPtr &config)
 {
-    Q_ASSERT(config != 0);
+    Q_ASSERT(config != nullptr);
     m_internalConfig->updateKScreenConfig(config);
 }
diff --git a/backends/qscreen/qscreenbackend.cpp \
b/backends/qscreen/qscreenbackend.cpp index f123dc4..b3ed545 100644
--- a/backends/qscreen/qscreenbackend.cpp
+++ b/backends/qscreen/qscreenbackend.cpp
@@ -26,13 +26,13 @@ using namespace KScreen;
 
 Q_LOGGING_CATEGORY(KSCREEN_QSCREEN, "kscreen.qscreen")
 
-QScreenConfig *QScreenBackend::s_internalConfig = 0;
+QScreenConfig *QScreenBackend::s_internalConfig = nullptr;
 
 QScreenBackend::QScreenBackend()
     : KScreen::AbstractBackend()
     , m_isValid(true)
 {
-    if (s_internalConfig == 0) {
+    if (s_internalConfig == nullptr) {
         s_internalConfig = new QScreenConfig();
         connect(s_internalConfig, &QScreenConfig::configChanged,
                 this, &QScreenBackend::configChanged);
diff --git a/backends/qscreen/qscreenconfig.h b/backends/qscreen/qscreenconfig.h
index 2c80eed..dc202fa 100644
--- a/backends/qscreen/qscreenconfig.h
+++ b/backends/qscreen/qscreenconfig.h
@@ -34,7 +34,7 @@ class QScreenConfig : public QObject
     Q_OBJECT
 
 public:
-    explicit QScreenConfig(QObject *parent = 0);
+    explicit QScreenConfig(QObject *parent = nullptr);
     virtual ~QScreenConfig();
 
     KScreen::ConfigPtr toKScreenConfig() const;
diff --git a/backends/qscreen/qscreenoutput.cpp b/backends/qscreen/qscreenoutput.cpp
index 812dd0d..3ed3d8c 100644
--- a/backends/qscreen/qscreenoutput.cpp
+++ b/backends/qscreen/qscreenoutput.cpp
@@ -30,7 +30,7 @@ using namespace KScreen;
 QScreenOutput::QScreenOutput(const QScreen *qscreen, QObject *parent)
     : QObject(parent)
     , m_qscreen(qscreen)
-    , m_edid(0)
+    , m_edid(nullptr)
     , m_id(-1)
 {
 }
diff --git a/backends/qscreen/qscreenoutput.h b/backends/qscreen/qscreenoutput.h
index ecbd0ba..dd36a2d 100644
--- a/backends/qscreen/qscreenoutput.h
+++ b/backends/qscreen/qscreenoutput.h
@@ -36,7 +36,7 @@ class QScreenOutput : public QObject
     Q_OBJECT
 
 public:
-    explicit QScreenOutput(const QScreen *qscreen, QObject *parent = 0);
+    explicit QScreenOutput(const QScreen *qscreen, QObject *parent = nullptr);
     virtual ~QScreenOutput();
 
     KScreen::OutputPtr toKScreenOutput() const;
diff --git a/backends/xcbeventlistener.cpp b/backends/xcbeventlistener.cpp
index d5143dc..536e7ee 100644
--- a/backends/xcbeventlistener.cpp
+++ b/backends/xcbeventlistener.cpp
@@ -54,7 +54,7 @@ XCBEventListener::XCBEventListener():
     m_randrErrorBase = queryExtension->first_error;
     m_majorOpcode = queryExtension->major_opcode;
 
-    xcb_generic_error_t *error = NULL;
+    xcb_generic_error_t *error = nullptr;
     auto* versionReply = xcb_randr_query_version_reply(c, cookie, &error);
     Q_ASSERT_X(versionReply, "xrandrxcbhelper", "Query to fetch xrandr version \
failed");  if (error) {
@@ -73,7 +73,7 @@ XCBEventListener::XCBEventListener():
     xcb_create_window(c, XCB_COPY_FROM_PARENT, m_window,
                       rWindow,
                       0, 0, 1, 1, 0, XCB_COPY_FROM_PARENT,
-                      XCB_COPY_FROM_PARENT, 0, NULL);
+                      XCB_COPY_FROM_PARENT, 0, nullptr);
 
     xcb_randr_select_input(c, m_window,
             XCB_RANDR_NOTIFY_MASK_SCREEN_CHANGE |
@@ -201,7 +201,7 @@ void XCBEventListener::handleXRandRNotify(xcb_generic_event_t* e)
         xcb_randr_output_property_t property = randrEvent->u.op;
 
         XCB::ScopedPointer<xcb_get_atom_name_reply_t> \
                reply(xcb_get_atom_name_reply(QX11Info::connection(),
-                xcb_get_atom_name(QX11Info::connection(), property.atom), NULL));
+                xcb_get_atom_name(QX11Info::connection(), property.atom), nullptr));
 
         qCDebug(KSCREEN_XCB_HELPER) << "RRNotify_OutputProperty (ignored)";
         qCDebug(KSCREEN_XCB_HELPER) << "\tOutput: " << property.output;
diff --git a/backends/xcbwrapper.cpp b/backends/xcbwrapper.cpp
index fc83c6b..b65ec91 100644
--- a/backends/xcbwrapper.cpp
+++ b/backends/xcbwrapper.cpp
@@ -21,14 +21,14 @@ along with this program.  If not, see \
<http://www.gnu.org/licenses/>.  
 #include "xcbwrapper.h"
 
-static xcb_connection_t *sXRandR11XCBConnection = 0;
+static xcb_connection_t *sXRandR11XCBConnection = nullptr;
 
 xcb_connection_t* XCB::connection()
 {
     // Use our own connection to make sure that we won't mess up Qt's connection
     // if something goes wrong on our side.
-    if (sXRandR11XCBConnection == 0) {
-        sXRandR11XCBConnection = xcb_connect(0, 0);
+    if (sXRandR11XCBConnection == nullptr) {
+        sXRandR11XCBConnection = xcb_connect(nullptr, nullptr);
     }
     return sXRandR11XCBConnection;
 }
@@ -37,7 +37,7 @@ void XCB::closeConnection()
 {
     if (sXRandR11XCBConnection) {
         xcb_disconnect(sXRandR11XCBConnection);
-        sXRandR11XCBConnection = 0;
+        sXRandR11XCBConnection = nullptr;
     }
 }
 
diff --git a/backends/xcbwrapper.h b/backends/xcbwrapper.h
index 638a471..d9f4960 100644
--- a/backends/xcbwrapper.h
+++ b/backends/xcbwrapper.h
@@ -60,7 +60,7 @@ public:
     Wrapper()
     : m_retrieved(false)
     , m_window(XCB_WINDOW_NONE)
-    , m_reply(Q_NULLPTR)
+    , m_reply(nullptr)
     {
         m_cookie.sequence = 0;
     }
@@ -68,14 +68,14 @@ public:
     : m_retrieved(false)
     , m_cookie(requestFunc(connection(), args ...))
     , m_window(requestWindow<RequestFuncArgs ...>(args ...))
-    , m_reply(Q_NULLPTR)
+    , m_reply(nullptr)
     {
     }
     explicit Wrapper(const Wrapper &other)
     : m_retrieved(other.m_retrieved)
     , m_cookie(other.m_cookie)
     , m_window(other.m_window)
-    , m_reply(Q_NULLPTR)
+    , m_reply(nullptr)
     {
         takeFromOther(const_cast<Wrapper&>(other));
     }
@@ -107,7 +107,7 @@ public:
     }
     inline bool isNull() const {
         getReply();
-        return m_reply == NULL;
+        return m_reply == nullptr;
     }
     inline operator bool() const {
         return !isNull();
@@ -132,7 +132,7 @@ public:
     inline Reply *take() {
         getReply();
         Reply *ret = m_reply;
-        m_reply = Q_NULLPTR;
+        m_reply = nullptr;
         m_window = XCB_WINDOW_NONE;
         return ret;
     }
@@ -142,7 +142,7 @@ protected:
         if (m_retrieved || !m_cookie.sequence) {
             return;
         }
-        m_reply = replyFunc(connection(), m_cookie, NULL);
+        m_reply = replyFunc(connection(), m_cookie, nullptr);
         m_retrieved = true;
     }
 
diff --git a/backends/xrandr/xrandr.cpp b/backends/xrandr/xrandr.cpp
index ac54ecf..81a219f 100644
--- a/backends/xrandr/xrandr.cpp
+++ b/backends/xrandr/xrandr.cpp
@@ -36,9 +36,9 @@
 #include <QX11Info>
 #include <QGuiApplication>
 
-xcb_screen_t* XRandR::s_screen = 0;
+xcb_screen_t* XRandR::s_screen = nullptr;
 xcb_window_t XRandR::s_rootWindow = 0;
-XRandRConfig* XRandR::s_internalConfig = 0;
+XRandRConfig* XRandR::s_internalConfig = nullptr;
 int XRandR::s_randrBase = 0;
 int XRandR::s_randrError = 0;
 bool XRandR::s_monitorInitialized = false;
@@ -51,9 +51,9 @@ Q_LOGGING_CATEGORY(KSCREEN_XRANDR, "kscreen.xrandr")
 
 XRandR::XRandR()
     : KScreen::AbstractBackend()
-    , m_x11Helper(0)
+    , m_x11Helper(nullptr)
     , m_isValid(false)
-    , m_configChangeCompressor(0)
+    , m_configChangeCompressor(nullptr)
 {
     qRegisterMetaType<xcb_randr_output_t>("xcb_randr_output_t");
     qRegisterMetaType<xcb_randr_crtc_t>("xcb_randr_crtc_t");
@@ -63,7 +63,7 @@ XRandR::XRandR()
 
     // Use our own connection to make sure that we won't mess up Qt's connection
     // if something goes wrong on our side.
-    xcb_generic_error_t *error = 0;
+    xcb_generic_error_t *error = nullptr;
     xcb_randr_query_version_reply_t* version;
     XCB::connection();
     version = xcb_randr_query_version_reply(XCB::connection(), \
xcb_randr_query_version(XCB::connection(), XCB_RANDR_MAJOR_VERSION, \
XCB_RANDR_MINOR_VERSION), &error); @@ -82,7 +82,7 @@ XRandR::XRandR()
         return;
     }
 
-    if (s_screen == 0) {
+    if (s_screen == nullptr) {
         s_screen = XCB::screenOfDisplay(XCB::connection(), QX11Info::appScreen());
         s_rootWindow = s_screen->root;
 
@@ -94,7 +94,7 @@ XRandR::XRandR()
 
     XRandR::s_has_1_3 = (version->major_version > 1 || (version->major_version == 1 \
&& version->minor_version >= 3));  
-    if (s_internalConfig == 0) {
+    if (s_internalConfig == nullptr) {
         s_internalConfig = new XRandRConfig();
     }
 
@@ -238,7 +238,7 @@ quint8* XRandR::getXProperty(xcb_randr_output_t output, \
                xcb_atom_t atom, size_t
     auto cookie = xcb_randr_get_output_property(XCB::connection(), output, atom,
                                                 XCB_ATOM_ANY,
                                                 0, 100, false, false);
-    auto reply = xcb_randr_get_output_property_reply(XCB::connection(), cookie, \
NULL); +    auto reply = xcb_randr_get_output_property_reply(XCB::connection(), \
cookie, nullptr);  if (reply->type == XCB_ATOM_INTEGER && reply->format == 8) {
         result = new quint8[reply->num_items];
         memcpy(result, xcb_randr_get_output_property_data(reply), reply->num_items);
@@ -257,11 +257,11 @@ quint8 *XRandR::outputEdid(xcb_randr_output_t outputId, size_t \
&len)  
     auto edid_atom = XCB::InternAtom(false, 4, "EDID")->atom;
     result = XRandR::getXProperty(outputId, edid_atom, len);
-    if (result == NULL) {
+    if (result == nullptr) {
         auto edid_atom = XCB::InternAtom(false, 9, "EDID_DATA")->atom;
         result = XRandR::getXProperty(outputId, edid_atom, len);
     }
-    if (result == NULL) {
+    if (result == nullptr) {
         auto edid_atom = XCB::InternAtom(false, 25, \
"XFree86_DDC_EDID1_RAWDATA")->atom;  result = XRandR::getXProperty(outputId, \
edid_atom, len);  }
@@ -275,7 +275,7 @@ quint8 *XRandR::outputEdid(xcb_randr_output_t outputId, size_t \
&len)  }
     }
 
-    return 0;
+    return nullptr;
 }
 
 xcb_randr_get_screen_resources_reply_t* XRandR::screenResources()
@@ -287,7 +287,7 @@ xcb_randr_get_screen_resources_reply_t* XRandR::screenResources()
             return reinterpret_cast<xcb_randr_get_screen_resources_reply_t*>(
                 xcb_randr_get_screen_resources_current_reply(XCB::connection(),
                     xcb_randr_get_screen_resources_current(XCB::connection(), \
                XRandR::rootWindow()),
-                    NULL));
+                    nullptr));
         } else {
             /* XRRGetScreenResourcesCurrent is faster then XRRGetScreenResources
              * because it returns cached values. However the cached values are not
@@ -298,7 +298,7 @@ xcb_randr_get_screen_resources_reply_t* XRandR::screenResources()
     }
 
     return xcb_randr_get_screen_resources_reply(XCB::connection(),
-        xcb_randr_get_screen_resources(XCB::connection(), XRandR::rootWindow()), \
NULL); +        xcb_randr_get_screen_resources(XCB::connection(), \
XRandR::rootWindow()), nullptr);  }
 
 xcb_window_t XRandR::rootWindow()
diff --git a/backends/xrandr/xrandrconfig.cpp b/backends/xrandr/xrandrconfig.cpp
index 40fbde6..ccc8ac8 100644
--- a/backends/xrandr/xrandrconfig.cpp
+++ b/backends/xrandr/xrandrconfig.cpp
@@ -474,8 +474,8 @@ bool XRandRConfig::disableOutput(const OutputPtr &kscreenOutput) \
const  0, 0,
             XCB_NONE,
             XCB_RANDR_ROTATION_ROTATE_0,
-            0, NULL);
-    XCB::ScopedPointer<xcb_randr_set_crtc_config_reply_t> \
reply(xcb_randr_set_crtc_config_reply(XCB::connection(), cookie, NULL)); +            \
0, nullptr); +    XCB::ScopedPointer<xcb_randr_set_crtc_config_reply_t> \
reply(xcb_randr_set_crtc_config_reply(XCB::connection(), cookie, nullptr));  if \
(!reply) {  qCDebug(KSCREEN_XRANDR) << "\tResult: unknown (error)";
         return false;
@@ -530,7 +530,7 @@ bool XRandRConfig::enableOutput(const OutputPtr &kscreenOutput) \
const  modeId,
             kscreenOutput->rotation(),
             1, outputs);
-    XCB::ScopedPointer<xcb_randr_set_crtc_config_reply_t> \
reply(xcb_randr_set_crtc_config_reply(XCB::connection(), cookie, NULL)); +    \
XCB::ScopedPointer<xcb_randr_set_crtc_config_reply_t> \
reply(xcb_randr_set_crtc_config_reply(XCB::connection(), cookie, nullptr));  if \
(!reply) {  qCDebug(KSCREEN_XRANDR) << "Result: unknown (error)";
         return false;
@@ -571,7 +571,7 @@ bool XRandRConfig::changeOutput(const OutputPtr &kscreenOutput) \
const  modeId,
             kscreenOutput->rotation(),
             1, outputs);
-    XCB::ScopedPointer<xcb_randr_set_crtc_config_reply_t> \
reply(xcb_randr_set_crtc_config_reply(XCB::connection(), cookie, NULL)); +    \
XCB::ScopedPointer<xcb_randr_set_crtc_config_reply_t> \
reply(xcb_randr_set_crtc_config_reply(XCB::connection(), cookie, nullptr));  if \
(!reply) {  qCDebug(KSCREEN_XRANDR) << "\tResult: unknown (error)";
         return false;
diff --git a/backends/xrandr/xrandroutput.cpp b/backends/xrandr/xrandroutput.cpp
index 9abc882..ceeba01 100644
--- a/backends/xrandr/xrandroutput.cpp
+++ b/backends/xrandr/xrandroutput.cpp
@@ -35,7 +35,7 @@ XRandROutput::XRandROutput(xcb_randr_output_t id, XRandRConfig \
*config)  , m_id(id)
     , m_type(KScreen::Output::Unknown)
     , m_primary(0)
-    , m_crtc(0)
+    , m_crtc(nullptr)
 {
     init();
 }
@@ -91,7 +91,7 @@ XRandRMode* XRandROutput::currentMode() const
     }
     int modeId = m_crtc->mode();
     if (!m_modes.contains(modeId)) {
-        return 0;
+        return nullptr;
     }
 
     return m_modes[modeId];
@@ -174,7 +174,7 @@ void XRandROutput::update(xcb_randr_crtc_t crtc, xcb_randr_mode_t \
mode, xcb_rand  if (crtc == XCB_NONE && mode == XCB_NONE) {
             // Monitor has been disabled
             m_crtc->disconectOutput(m_id);
-            m_crtc = 0;
+            m_crtc = nullptr;
         } else {
             m_crtc = m_config->crtc(crtc);
             m_crtc->connectOutput(m_id);
@@ -276,7 +276,7 @@ QByteArray XRandROutput::typeFromProperty(xcb_randr_output_t \
outputId)  
     auto cookie = xcb_randr_get_output_property(XCB::connection(), outputId, \
                atomType->atom,
                                                 XCB_ATOM_ANY, 0, 100, false, false);
-    XCB::ScopedPointer<xcb_randr_get_output_property_reply_t> \
reply(xcb_randr_get_output_property_reply(XCB::connection(), cookie, NULL)); +    \
XCB::ScopedPointer<xcb_randr_get_output_property_reply_t> \
reply(xcb_randr_get_output_property_reply(XCB::connection(), cookie, nullptr));  if \
(!reply) {  return type;
     }
diff --git a/backends/xrandr/xrandrscreen.h b/backends/xrandr/xrandrscreen.h
index c7a9fc3..7503c13 100644
--- a/backends/xrandr/xrandrscreen.h
+++ b/backends/xrandr/xrandrscreen.h
@@ -36,7 +36,7 @@ class XRandRScreen : public QObject
     Q_OBJECT
 
 public:
-    explicit XRandRScreen(XRandRConfig *config = 0);
+    explicit XRandRScreen(XRandRConfig *config = nullptr);
     virtual ~XRandRScreen();
 
     KScreen::ScreenPtr toKScreenScreen() const;
diff --git a/backends/xrandr1.1/xrandr11.cpp b/backends/xrandr1.1/xrandr11.cpp
index 3a8e833..1af6a5b 100644
--- a/backends/xrandr1.1/xrandr11.cpp
+++ b/backends/xrandr1.1/xrandr11.cpp
@@ -34,11 +34,11 @@ Q_LOGGING_CATEGORY(KSCREEN_XRANDR11, "kscreen.xrandr11")
 XRandR11::XRandR11()
  : KScreen::AbstractBackend()
  , m_valid(false)
- , m_x11Helper(0)
+ , m_x11Helper(nullptr)
  , m_currentConfig(new KScreen::Config)
  , m_currentTimestamp(0)
 {
-    xcb_generic_error_t *error = 0;
+    xcb_generic_error_t *error = nullptr;
     xcb_randr_query_version_reply_t* version;
     version = xcb_randr_query_version_reply(XCB::connection(),
         xcb_randr_query_version(XCB::connection(), XCB_RANDR_MAJOR_VERSION, \
                XCB_RANDR_MINOR_VERSION), &error);
diff --git a/src/backendmanager.cpp b/src/backendmanager.cpp
index a895198..bd0559f 100644
--- a/src/backendmanager.cpp
+++ b/src/backendmanager.cpp
@@ -62,11 +62,11 @@ BackendManager *BackendManager::instance()
 
 BackendManager::BackendManager()
     : QObject()
-    , mInterface(0)
+    , mInterface(nullptr)
     , mCrashCount(0)
     , mShuttingDown(false)
     , mRequestsCounter(0)
-    , mLoader(0)
+    , mLoader(nullptr)
     , mMethod(OutOfProcess)
 {
     Log::instance();
@@ -377,7 +377,7 @@ void BackendManager::invalidateInterface()
 {
     Q_ASSERT(mMethod == OutOfProcess);
     delete mInterface;
-    mInterface = 0;
+    mInterface = nullptr;
     mBackendService.clear();
 }
 
diff --git a/src/configoperation.h b/src/configoperation.h
index 73ea06f..142b4e7 100644
--- a/src/configoperation.h
+++ b/src/configoperation.h
@@ -54,7 +54,7 @@ Q_SIGNALS:
     void finished(ConfigOperation *operation);
 
 protected:
-    explicit ConfigOperation(ConfigOperationPrivate *dd, QObject *parent = 0);
+    explicit ConfigOperation(ConfigOperationPrivate *dd, QObject *parent = nullptr);
 
     void setError(const QString &error);
     void emitResult();
diff --git a/src/output.cpp b/src/output.cpp
index af70e57..12eecab 100644
--- a/src/output.cpp
+++ b/src/output.cpp
@@ -41,7 +41,7 @@ class Q_DECL_HIDDEN Output::Private
         connected(false),
         enabled(false),
         primary(false),
-        edid(0)
+        edid(nullptr)
     {}
 
     Private(const Private &other):
@@ -142,14 +142,14 @@ QString Output::Private::biggestMode(const ModeList& modes) \
const  }
 
     if (!biggest) {
-        return 0;
+        return nullptr;
     }
 
     return biggest->id();
 }
 
 Output::Output()
- : QObject(0)
+ : QObject(nullptr)
  , d(new Private())
 {
 
@@ -460,7 +460,7 @@ void Output::setClones(QList<int> outputlist)
 
 void Output::setEdid(const QByteArray& rawData)
 {
-    Q_ASSERT(d->edid == 0);
+    Q_ASSERT(d->edid == nullptr);
     d->edid = new Edid(rawData);
 }
 
diff --git a/src/screen.cpp b/src/screen.cpp
index 34326f7..d22a268 100644
--- a/src/screen.cpp
+++ b/src/screen.cpp
@@ -46,7 +46,7 @@ class Q_DECL_HIDDEN Screen::Private
 };
 
 Screen::Screen()
- : QObject(0)
+ : QObject(nullptr)
  , d(new Private())
 {
 }
diff --git a/tests/kwayland/waylandtestserver.h b/tests/kwayland/waylandtestserver.h
index 48027fd..e3d733a 100644
--- a/tests/kwayland/waylandtestserver.h
+++ b/tests/kwayland/waylandtestserver.h
@@ -45,7 +45,7 @@ class WaylandTestServer : public QObject
     Q_OBJECT
 
 public:
-    explicit WaylandTestServer(QObject *parent = 0);
+    explicit WaylandTestServer(QObject *parent = nullptr);
     virtual ~WaylandTestServer();
 
     void setConfig(const QString &configfile);
diff --git a/tests/testpnp.h b/tests/testpnp.h
index 76fe455..9120f95 100644
--- a/tests/testpnp.h
+++ b/tests/testpnp.h
@@ -35,7 +35,7 @@ class TestPnp : public QObject
     Q_OBJECT
 
 public:
-    explicit TestPnp(bool monitor, QObject *parent = 0);
+    explicit TestPnp(bool monitor, QObject *parent = nullptr);
     virtual ~TestPnp();
 
 private Q_SLOTS:


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic