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

List:       kde-commits
Subject:    [systemsettings] /: Use nullptr
From:       Friedrich W. H. Kossebau <null () kde ! org>
Date:       2018-02-08 1:41:45
Message-ID: E1ejbDd-0004GY-58 () code ! kde ! org
[Download RAW message or body]

Git commit 71c020d790d3fb5f7757a639852b6b66130221dc by Friedrich W. H. Kossebau.
Committed on 08/02/2018 at 01:35.
Pushed by kossebau into branch 'master'.

Use nullptr

M  +4    -4    app/SettingsBase.cpp
M  +3    -3    app/ToolTips/tooltipmanager.cpp
M  +1    -1    classic/ClassicMode.cpp
M  +1    -1    core/ExternalAppModule.h
M  +1    -1    core/MenuModel.cpp
M  +1    -1    core/MenuModel.h
M  +1    -1    core/MenuProxyModel.h
M  +1    -1    core/ModuleView.h
M  +1    -1    icons/CategorizedView.h
M  +2    -2    icons/IconMode.cpp
M  +1    -1    sidebar/CategorizedView.h
M  +1    -1    sidebar/SidebarMode.cpp
M  +3    -3    sidebar/ToolTips/tooltipmanager.cpp

https://commits.kde.org/systemsettings/71c020d790d3fb5f7757a639852b6b66130221dc

diff --git a/app/SettingsBase.cpp b/app/SettingsBase.cpp
index 3e04cee..409663d 100644
--- a/app/SettingsBase.cpp
+++ b/app/SettingsBase.cpp
@@ -168,7 +168,7 @@ void SettingsBase::initHelpMenu()
     actionCollection()->addAction( QStringLiteral("help_toolbar_menu"), \
helpActionMenu );  // Add the custom actions
     aboutModuleAction = actionCollection()->addAction( KStandardAction::AboutApp, \
                QStringLiteral("help_about_module"), this, SLOT(about()) );
-    changeAboutMenu( 0, aboutModuleAction, i18n("About Active Module") );
+    changeAboutMenu( nullptr, aboutModuleAction, i18n("About Active Module") );
     aboutViewAction = actionCollection()->addAction( KStandardAction::AboutApp, \
QStringLiteral("help_about_view"), this, SLOT(about()) );  }
 
@@ -293,9 +293,9 @@ bool SettingsBase::queryClose()
 void SettingsBase::about()
 {
     delete aboutDialog;
-    aboutDialog = 0;
+    aboutDialog = nullptr;
 
-    const KAboutData * about = 0;
+    const KAboutData * about = nullptr;
     if( sender() == aboutViewAction ) {
         about = activeView->aboutData();
     } else if( sender() == aboutModuleAction && activeView->moduleView() ) {
@@ -303,7 +303,7 @@ void SettingsBase::about()
     }
 
     if( about ) {
-        aboutDialog = new KAboutApplicationDialog(*about, 0);
+        aboutDialog = new KAboutApplicationDialog(*about, nullptr);
         aboutDialog->show();
     }
 }
diff --git a/app/ToolTips/tooltipmanager.cpp b/app/ToolTips/tooltipmanager.cpp
index 3fc5fba..6097e06 100644
--- a/app/ToolTips/tooltipmanager.cpp
+++ b/app/ToolTips/tooltipmanager.cpp
@@ -38,9 +38,9 @@ class ToolTipManager::Private
 {
 public:
     Private() :
-        tooltip(0),
-        view(0),
-        timer(0),
+        tooltip(nullptr),
+        view(nullptr),
+        timer(nullptr),
         delay(300)
         { }
 
diff --git a/classic/ClassicMode.cpp b/classic/ClassicMode.cpp
index 069e871..4a8932b 100644
--- a/classic/ClassicMode.cpp
+++ b/classic/ClassicMode.cpp
@@ -94,7 +94,7 @@ void ClassicMode::initEvent()
     d->proxyModel = new MenuProxyModel( this );
     d->proxyModel->setSourceModel( d->model );
     d->proxyModel->sort( 0 );
-    d->classicWidget = new QSplitter( Qt::Horizontal, 0 );
+    d->classicWidget = new QSplitter( Qt::Horizontal, nullptr );
     d->classicWidget->setChildrenCollapsible( false );
     d->moduleView = new ModuleView( d->classicWidget );
     d->classicTree = nullptr;
diff --git a/core/ExternalAppModule.h b/core/ExternalAppModule.h
index 9be2931..e613fff 100644
--- a/core/ExternalAppModule.h
+++ b/core/ExternalAppModule.h
@@ -32,7 +32,7 @@ class ExternalAppModule : public QWidget
     Q_OBJECT
 
 public:
-    explicit ExternalAppModule(QWidget * parent = 0, KCModuleInfo * module = 0);
+    explicit ExternalAppModule(QWidget * parent = nullptr, KCModuleInfo * module = \
nullptr);  ~ExternalAppModule() override;
 
 protected:
diff --git a/core/MenuModel.cpp b/core/MenuModel.cpp
index 45a5a02..e8a3889 100644
--- a/core/MenuModel.cpp
+++ b/core/MenuModel.cpp
@@ -114,7 +114,7 @@ QVariant MenuModel::data( const QModelIndex &index, int role ) \
const  Qt::ItemFlags MenuModel::flags( const QModelIndex &index ) const
 {
     if ( !index.isValid() ) {
-        return 0;
+        return nullptr;
     }
 
     return Qt::ItemIsEnabled | Qt::ItemIsSelectable;
diff --git a/core/MenuModel.h b/core/MenuModel.h
index 434e04d..2ba7009 100644
--- a/core/MenuModel.h
+++ b/core/MenuModel.h
@@ -48,7 +48,7 @@ public:
      * @param menuRoot The MenuItem to use as the basis for providing information.
      * @param parent The QObject to use as a parent of the MenuModel.
      */
-    explicit MenuModel( MenuItem * menuRoot, QObject *parent = 0 );
+    explicit MenuModel( MenuItem * menuRoot, QObject *parent = nullptr );
 
     /**
      * Destroys the MenuModel. The menuRoot will not be destroyed.
diff --git a/core/MenuProxyModel.h b/core/MenuProxyModel.h
index 47623e6..b03a7da 100644
--- a/core/MenuProxyModel.h
+++ b/core/MenuProxyModel.h
@@ -48,7 +48,7 @@ public:
      *
      * @param parent The QObject to use as a parent.
      */
-    MenuProxyModel( QObject *parent = 0 );
+    MenuProxyModel( QObject *parent = nullptr );
 
     QHash<int, QByteArray> roleNames() const override;
 
diff --git a/core/ModuleView.h b/core/ModuleView.h
index 4daa0ba..b6ddc88 100644
--- a/core/ModuleView.h
+++ b/core/ModuleView.h
@@ -55,7 +55,7 @@ public:
     /**
      * Constructs a ModuleView, with the parent specified.
      */
-    explicit ModuleView(QWidget * parent = 0);
+    explicit ModuleView(QWidget * parent = nullptr);
 
     /**
      * Destroys the module view, along with all modules loaded, and any changes \
                present in them.
diff --git a/icons/CategorizedView.h b/icons/CategorizedView.h
index da48369..c72c3ee 100644
--- a/icons/CategorizedView.h
+++ b/icons/CategorizedView.h
@@ -25,7 +25,7 @@
 class CategorizedView : public KCategorizedView
 {
 public:
-    CategorizedView( QWidget *parent = 0 );
+    CategorizedView( QWidget *parent = nullptr );
 
     void setModel( QAbstractItemModel *model ) override;
 protected:
diff --git a/icons/IconMode.cpp b/icons/IconMode.cpp
index 97541cf..d1e247b 100644
--- a/icons/IconMode.cpp
+++ b/icons/IconMode.cpp
@@ -38,7 +38,7 @@ K_PLUGIN_FACTORY( IconModeFactory, registerPlugin<IconMode>(); )
 
 class IconMode::Private {
 public:
-    Private() : categoryDrawer( 0 ),  categoryView( 0 ), moduleView( 0 ) {}
+    Private() : categoryDrawer( nullptr ),  categoryView( nullptr ), moduleView( \
nullptr ) {}  virtual ~Private() {
         delete aboutIcon;
     }
@@ -116,7 +116,7 @@ void IconMode::initEvent()
     d->moduleView = new ModuleView( d->mainWidget );
     connect( d->moduleView, &ModuleView::moduleChanged, this, \
                &IconMode::moduleLoaded );
     connect( d->moduleView, &ModuleView::closeRequest, this, \
                &IconMode::backToOverview );
-    d->categoryView = 0;
+    d->categoryView = nullptr;
 }
 
 void IconMode::searchChanged( const QString& text )
diff --git a/sidebar/CategorizedView.h b/sidebar/CategorizedView.h
index da48369..c72c3ee 100644
--- a/sidebar/CategorizedView.h
+++ b/sidebar/CategorizedView.h
@@ -25,7 +25,7 @@
 class CategorizedView : public KCategorizedView
 {
 public:
-    CategorizedView( QWidget *parent = 0 );
+    CategorizedView( QWidget *parent = nullptr );
 
     void setModel( QAbstractItemModel *model ) override;
 protected:
diff --git a/sidebar/SidebarMode.cpp b/sidebar/SidebarMode.cpp
index 18aa757..7641a1d 100644
--- a/sidebar/SidebarMode.cpp
+++ b/sidebar/SidebarMode.cpp
@@ -344,7 +344,7 @@ void SidebarMode::initEvent()
     d->mainLayout->setContentsMargins(0, 0, 0, 0);
     d->moduleView = new ModuleView( d->mainWidget );
     connect( d->moduleView, &ModuleView::moduleChanged, this, \
                &SidebarMode::moduleLoaded );
-    d->quickWidget = 0;
+    d->quickWidget = nullptr;
     moduleView()->setFaceType(KPageView::Plain);
 }
 
diff --git a/sidebar/ToolTips/tooltipmanager.cpp \
b/sidebar/ToolTips/tooltipmanager.cpp index 3e28f4b..33fd72a 100644
--- a/sidebar/ToolTips/tooltipmanager.cpp
+++ b/sidebar/ToolTips/tooltipmanager.cpp
@@ -39,9 +39,9 @@ class ToolTipManager::Private
 {
 public:
     Private() :
-        tooltip(0),
-        view(0),
-        timer(0),
+        tooltip(nullptr),
+        view(nullptr),
+        timer(nullptr),
         delay(300)
         { }
 


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

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