Commit 7d523c31 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Use nullptr

parent 12312362
......@@ -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)
......
......@@ -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) {
......
......@@ -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);
......
......@@ -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;
};
......
......@@ -27,11 +27,11 @@
class DataHelper {
public:
DataHelper() : object(0) {}
DataHelper() {}
~DataHelper() {
delete object;
}
BaseData * object;
BaseData * object = nullptr;
};
Q_GLOBAL_STATIC(DataHelper, internalInstance)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment