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

List:       kde-commits
Subject:    [systemsettings] /: Use nullptr
From:       Laurent Montel <null () kde ! org>
Date:       2018-01-16 20:44:59
Message-ID: E1ebY6N-0006eo-J2 () code ! kde ! org
[Download RAW message or body]

Git commit 7d523c314f67c6b8f9130d8344b6a75a2a9551bd by Laurent Montel.
Committed on 16/01/2018 at 20:44.
Pushed by mlaurent into branch 'master'.

Use nullptr

M  +1    -1    CMakeLists.txt
M  +5    -5    app/SettingsBase.cpp
M  +1    -1    app/SystemSettingsApp.cpp
M  +2    -2    classic/CategoryList.cpp
M  +2    -2    core/BaseData.cpp

https://commits.kde.org/systemsettings/7d523c314f67c6b8f9130d8344b6a75a2a9551bd

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 04daad6..da32a88 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -6,7 +6,7 @@ cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR)
 set(QT_MIN_VERSION "5.7.0")
 set(KF5_MIN_VERSION "5.30")
 
-find_package(ECM 1.2.0 REQUIRED NO_MODULE)
+find_package(ECM ${KF5_MIN_VERSION} REQUIRED NO_MODULE)
 set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR})
 
 include(KDEInstallDirs)
diff --git a/app/SettingsBase.cpp b/app/SettingsBase.cpp
index 91298a8..ca6245c 100644
--- a/app/SettingsBase.cpp
+++ b/app/SettingsBase.cpp
@@ -46,10 +46,10 @@ SettingsBase::SettingsBase( QWidget * parent )
     : KXmlGuiWindow(parent)
 {
     // Ensure delayed loading doesn't cause a crash
-    activeView = 0;
-    aboutDialog = 0;
-    configDialog = 0;
-    lostFound = 0;
+    activeView = nullptr;
+    aboutDialog = nullptr;
+    configDialog = nullptr;
+    lostFound = nullptr;
     // Prepare the view area
     stackedWidget = new QStackedWidget( this );
     setWindowTitle(i18n("System Settings"));
@@ -88,7 +88,7 @@ void SettingsBase::initApplication()
     categories = KServiceTypeTrader::self()->query("SystemSettingsCategory");
     modules = KServiceTypeTrader::self()->query("KCModule", \
                "[X-KDE-System-Settings-Parent-Category] != ''");
     modules += KServiceTypeTrader::self()->query("SystemSettingsExternalApp");
-    rootModule = new MenuItem( true, 0 );
+    rootModule = new MenuItem( true, nullptr );
     initMenuList(rootModule);
     // Handle lost+found modules...
     if (lostFound) {
diff --git a/app/SystemSettingsApp.cpp b/app/SystemSettingsApp.cpp
index acc5a79..7210e69 100644
--- a/app/SystemSettingsApp.cpp
+++ b/app/SystemSettingsApp.cpp
@@ -23,7 +23,7 @@
 
 SystemSettingsApp::SystemSettingsApp(int& argc, char* argv[])
     : QApplication(argc, argv)
-    , window(0)
+    , window(nullptr)
 {
     setOrganizationDomain("kde.org");
     KDBusService* service = new KDBusService(KDBusService::Unique, this);
diff --git a/classic/CategoryList.cpp b/classic/CategoryList.cpp
index 1b412a4..8ec25c8 100644
--- a/classic/CategoryList.cpp
+++ b/classic/CategoryList.cpp
@@ -46,9 +46,9 @@ class CategoryList::Private {
 public:
     Private() {}
 
-    KHTMLPart * categoryView;
+    KHTMLPart * categoryView = nullptr;
     QModelIndex categoryMenu;
-    QAbstractItemModel * itemModel;
+    QAbstractItemModel * itemModel = nullptr;
     QMap<QString, QModelIndex> itemMap;
 };
 
diff --git a/core/BaseData.cpp b/core/BaseData.cpp
index 2a097fa..76144a8 100644
--- a/core/BaseData.cpp
+++ b/core/BaseData.cpp
@@ -27,11 +27,11 @@
 class DataHelper {
 
 public:
-    DataHelper() : object(0) {}
+    DataHelper() {}
     ~DataHelper() {
         delete object;
     }
-    BaseData * object;
+    BaseData * object = nullptr;
 };
 
 Q_GLOBAL_STATIC(DataHelper, internalInstance)


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

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