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

List:       kde-commits
Subject:    [plasma-sdk] /: Use nullptr
From:       Friedrich W. H. Kossebau <null () kde ! org>
Date:       2018-02-27 20:30:30
Message-ID: E1eqltO-00029G-FC () code ! kde ! org
[Download RAW message or body]

Git commit 3c2ff58fda2d84fd07064131485fd5bed4c33e4e by Friedrich W. H. Kossebau.
Committed on 27/02/2018 at 19:43.
Pushed by kossebau into branch 'master'.

Use nullptr

M  +1    -1    cuttlefish/src/editorplugin/cuttlefishplugin.h
M  +1    -1    cuttlefish/src/iconmodel.h
M  +1    -1    cuttlefish/src/view.cpp
M  +1    -1    cuttlefish/src/view.h
M  +5    -5    engineexplorer/engineexplorer.cpp
M  +1    -1    engineexplorer/engineexplorer.h
M  +4    -4    engineexplorer/ktreeviewsearchline.cpp
M  +2    -2    engineexplorer/ktreeviewsearchline.h
M  +4    -4    engineexplorer/modelviewer.cpp
M  +2    -2    engineexplorer/modelviewer.h
M  +5    -5    engineexplorer/serviceviewer.cpp
M  +1    -1    engineexplorer/serviceviewer.h
M  +1    -1    engineexplorer/titlecombobox.h
M  +1    -1    lookandfeelexplorer/src/lnflistmodel.h
M  +1    -1    lookandfeelexplorer/src/lnflogic.cpp
M  +1    -1    lookandfeelexplorer/src/lnflogic.h
M  +1    -1    plasmoidviewer/privateheaders/containmentview.h
M  +3    -3    plasmoidviewer/view.cpp
M  +1    -1    plasmoidviewer/view.h
M  +1    -1    themeexplorer/src/coloreditor.h
M  +1    -1    themeexplorer/src/themelistmodel.h
M  +1    -1    themeexplorer/src/thememodel.h

https://commits.kde.org/plasma-sdk/3c2ff58fda2d84fd07064131485fd5bed4c33e4e

diff --git a/cuttlefish/src/editorplugin/cuttlefishplugin.h \
b/cuttlefish/src/editorplugin/cuttlefishplugin.h index 9c06d64..d51e7a7 100644
--- a/cuttlefish/src/editorplugin/cuttlefishplugin.h
+++ b/cuttlefish/src/editorplugin/cuttlefishplugin.h
@@ -38,7 +38,7 @@ class CuttleFishPlugin : public KTextEditor::Plugin
     Q_OBJECT
 
 public:
-    explicit CuttleFishPlugin(QObject *parent = 0, const QList<QVariant> & = \
QList<QVariant>()); +    explicit CuttleFishPlugin(QObject *parent = nullptr, const \
QList<QVariant> & = QList<QVariant>());  virtual ~CuttleFishPlugin();
 
     QObject *createView(KTextEditor::MainWindow *mainWindow) Q_DECL_OVERRIDE;
diff --git a/cuttlefish/src/iconmodel.h b/cuttlefish/src/iconmodel.h
index 58880f3..f4e374e 100644
--- a/cuttlefish/src/iconmodel.h
+++ b/cuttlefish/src/iconmodel.h
@@ -57,7 +57,7 @@ public:
         Theme
     };
 
-    explicit IconModel(QObject *parent = 0);
+    explicit IconModel(QObject *parent = nullptr);
 
 
     virtual QHash<int, QByteArray> roleNames() const;
diff --git a/cuttlefish/src/view.cpp b/cuttlefish/src/view.cpp
index 63e7aed..ae375fc 100644
--- a/cuttlefish/src/view.cpp
+++ b/cuttlefish/src/view.cpp
@@ -36,7 +36,7 @@ using namespace CuttleFish;
 
 View::View(const QString &category, QCommandLineParser &parser, QWindow *parent)
     : QQuickView(parent),
-    m_browserRootItem(0)
+    m_browserRootItem(nullptr)
 {
     setResizeMode(QQuickView::SizeRootObjectToView);
     QQuickWindow::setDefaultAlphaBuffer(true);
diff --git a/cuttlefish/src/view.h b/cuttlefish/src/view.h
index 811e4e6..6fc474e 100644
--- a/cuttlefish/src/view.h
+++ b/cuttlefish/src/view.h
@@ -35,7 +35,7 @@ class View : public QQuickView
     Q_OBJECT
 
 public:
-    explicit View(const QString &category, QCommandLineParser &parser, QWindow \
*parent = 0 ); +    explicit View(const QString &category, QCommandLineParser \
&parser, QWindow *parent = nullptr);  ~View();
 
 Q_SIGNALS:
diff --git a/engineexplorer/engineexplorer.cpp b/engineexplorer/engineexplorer.cpp
index eb83060..b0f277a 100644
--- a/engineexplorer/engineexplorer.cpp
+++ b/engineexplorer/engineexplorer.cpp
@@ -49,7 +49,7 @@ Q_DECLARE_METATYPE(Plasma::DataEngine::Data)
 
 EngineExplorer::EngineExplorer(QWidget* parent)
     : QDialog(parent),
-      m_engine(0),
+      m_engine(nullptr),
       m_sourceCount(0),
       m_requestingSource(false),
       m_expandButton(new QPushButton(i18n("Expand All"), this)),
@@ -142,7 +142,7 @@ void EngineExplorer::setInterval(const int interval)
 
 void EngineExplorer::dataUpdated(const QString& source, const \
Plasma::DataEngine::Data& data)  {
-    QList<QStandardItem*> items = m_dataModel->findItems(source, 0);
+    QList<QStandardItem*> items = m_dataModel->findItems(source, nullptr);
 
     if (items.isEmpty()) {
         return;
@@ -182,7 +182,7 @@ void EngineExplorer::showEngine(const QString& name)
     QStringList headers;
     headers << i18n("DataSource") << i18n("Key") << i18n("Value") << i18n("Type");
     m_dataModel->setHorizontalHeaderLabels(headers);
-    m_engine = 0;
+    m_engine = nullptr;
     m_sourceCount = 0;
 
     if (!m_engineName.isEmpty()) {
@@ -223,7 +223,7 @@ void EngineExplorer::showEngine(const QString& name)
 void EngineExplorer::addSource(const QString& source)
 {
     //qDebug() << "adding" << source;
-    QList<QStandardItem*> items = m_dataModel->findItems(source, 0);
+    QList<QStandardItem*> items = m_dataModel->findItems(source, nullptr);
     if (!items.isEmpty()) {
         //qDebug() << "er... already there?";
         return;
@@ -246,7 +246,7 @@ void EngineExplorer::addSource(const QString& source)
 
 void EngineExplorer::removeSource(const QString& source)
 {
-    QList<QStandardItem*> items = m_dataModel->findItems(source, 0);
+    QList<QStandardItem*> items = m_dataModel->findItems(source, nullptr);
 
     if (items.count() < 1) {
         return;
diff --git a/engineexplorer/engineexplorer.h b/engineexplorer/engineexplorer.h
index b810b5b..ed99fdb 100644
--- a/engineexplorer/engineexplorer.h
+++ b/engineexplorer/engineexplorer.h
@@ -43,7 +43,7 @@ class EngineExplorer : public QDialog, public Ui::EngineExplorer
     Q_OBJECT
 
     public:
-        explicit EngineExplorer(QWidget *parent = 0);
+        explicit EngineExplorer(QWidget *parent = nullptr);
         ~EngineExplorer();
 
         void setApp(const QString &app);
diff --git a/engineexplorer/ktreeviewsearchline.cpp \
b/engineexplorer/ktreeviewsearchline.cpp index 29960ac..8be5389 100644
--- a/engineexplorer/ktreeviewsearchline.cpp
+++ b/engineexplorer/ktreeviewsearchline.cpp
@@ -84,7 +84,7 @@ void KTreeViewSearchLinePrivate::rowsInserted( QAbstractItemModel \
*model, const  if ( !model )
     return;
 
-  QTreeView* widget = 0L;
+  QTreeView* widget = nullptr;
   foreach ( QTreeView* tree, treeViews )
     if ( tree->model() == model ) {
       widget = tree;
@@ -264,7 +264,7 @@ QTreeView *KTreeViewSearchLine::treeView() const
   if ( d->treeViews.count() == 1 )
     return d->treeViews.first();
   else
-    return 0;
+    return nullptr;
 }
 
 QList<QTreeView *> KTreeViewSearchLine::treeViews() const
@@ -549,8 +549,8 @@ class KTreeViewSearchLineWidgetPrivate
 {
   public:
     KTreeViewSearchLineWidgetPrivate()
-      : treeView( 0 ),
-        searchLine( 0 )
+      : treeView( nullptr ),
+        searchLine( nullptr )
     {
     }
 
diff --git a/engineexplorer/ktreeviewsearchline.h \
b/engineexplorer/ktreeviewsearchline.h index 095d27a..3f175cd 100644
--- a/engineexplorer/ktreeviewsearchline.h
+++ b/engineexplorer/ktreeviewsearchline.h
@@ -54,7 +54,7 @@ class KTreeViewSearchLine : public KLineEdit
      * If \a treeView is null then the widget will be disabled until listviews
      * are set with setTreeView(), setTreeViews() or added with addTreeView().
      */
-    explicit KTreeViewSearchLine( QWidget *parent = 0, QTreeView *treeView = 0 );
+    explicit KTreeViewSearchLine( QWidget *parent = nullptr, QTreeView *treeView = \
nullptr );  
     /**
      * Constructs a KTreeViewSearchLine with \a treeViews being the list of
@@ -280,7 +280,7 @@ class KTreeViewSearchLineWidget : public QWidget
      * Creates a KTreeViewSearchLineWidget for \a treeView with \a parent as the
      * parent.
      */
-    explicit KTreeViewSearchLineWidget( QWidget *parent = 0, QTreeView *treeView = 0 \
); +    explicit KTreeViewSearchLineWidget( QWidget *parent = nullptr, QTreeView \
*treeView = nullptr );  
     /**
      * Destroys the KTreeViewSearchLineWidget
diff --git a/engineexplorer/modelviewer.cpp b/engineexplorer/modelviewer.cpp
index fa881b6..dbcf00d 100644
--- a/engineexplorer/modelviewer.cpp
+++ b/engineexplorer/modelviewer.cpp
@@ -104,7 +104,7 @@ ModelViewer::ModelViewer(Plasma::DataEngine *engine, const \
                QString &source, QWid
         qDebug() << "########### CALLING SERVICE FOR SOURCE: " << m_source;
         m_model = m_engine->modelForSource(m_source);
 
-        if (m_model != 0) {
+        if (m_model != nullptr) {
             connect(m_engine, SIGNAL(destroyed(QObject*)), this, \
SLOT(engineDestroyed()));  m_view->setModel(m_model);
         } else {
@@ -118,14 +118,14 @@ ModelViewer::ModelViewer(Plasma::DataEngine *engine, const \
QString &source, QWid  
 ModelViewer::~ModelViewer()
 {
-    m_engine = 0;
+    m_engine = nullptr;
 }
 
 
 void ModelViewer::engineDestroyed()
 {
-    m_model = 0;
-    m_engine = 0;
+    m_model = nullptr;
+    m_engine = nullptr;
     hide();
     deleteLater();
 }
diff --git a/engineexplorer/modelviewer.h b/engineexplorer/modelviewer.h
index ca066b7..56968c9 100644
--- a/engineexplorer/modelviewer.h
+++ b/engineexplorer/modelviewer.h
@@ -38,7 +38,7 @@ class Delegate : public QAbstractItemDelegate
     Q_OBJECT
 
 public:
-    Delegate(QObject *parent = 0);
+    Delegate(QObject *parent = nullptr);
     virtual ~Delegate();
 
     virtual void paint(QPainter *painter, const QStyleOptionViewItem &option,
@@ -54,7 +54,7 @@ class ModelViewer : public QDialog
     Q_OBJECT
 
 public:
-    ModelViewer(Plasma::DataEngine *engine, const QString &m_source, QWidget *parent \
= 0); +    ModelViewer(Plasma::DataEngine *engine, const QString &m_source, QWidget \
*parent = nullptr);  ~ModelViewer();
 
 private Q_SLOTS:
diff --git a/engineexplorer/serviceviewer.cpp b/engineexplorer/serviceviewer.cpp
index 7f21fa6..e69f2e3 100644
--- a/engineexplorer/serviceviewer.cpp
+++ b/engineexplorer/serviceviewer.cpp
@@ -34,7 +34,7 @@
 ServiceViewer::ServiceViewer(Plasma::DataEngine *engine, const QString &source, \
QWidget *parent)  : QDialog(parent),
       m_engine(engine),
-      m_service(0),
+      m_service(nullptr),
       m_source(source),
       m_operationCount(0),
       m_operationButton(new QPushButton(i18n("Start Operation"), this))
@@ -72,7 +72,7 @@ ServiceViewer::ServiceViewer(Plasma::DataEngine *engine, const \
                QString &source,
         qDebug() << "########### CALLING SERVICE FOR SOURCE: " << m_source;
         m_service = m_engine->serviceForSource(m_source);
 
-        if (m_service != 0) {
+        if (m_service != nullptr) {
             serviceName = m_service->name();
             updateOperations();
             connect(m_service, SIGNAL(operationsChanged()), this, \
SLOT(updateOperations())); @@ -93,7 +93,7 @@ \
ServiceViewer::ServiceViewer(Plasma::DataEngine *engine, const QString &source,  \
ServiceViewer::~ServiceViewer()  {
     delete m_service;
-    m_engine = 0;
+    m_engine = nullptr;
 }
 
 void ServiceViewer::updateOperations()
@@ -214,8 +214,8 @@ void ServiceViewer::operationResult(KJob *j)
 
 void ServiceViewer::engineDestroyed()
 {
-    m_service = 0;
-    m_engine = 0;
+    m_service = nullptr;
+    m_engine = nullptr;
     hide();
     deleteLater();
 }
diff --git a/engineexplorer/serviceviewer.h b/engineexplorer/serviceviewer.h
index 1abd6e4..2a39f49 100644
--- a/engineexplorer/serviceviewer.h
+++ b/engineexplorer/serviceviewer.h
@@ -37,7 +37,7 @@ class ServiceViewer : public QDialog, public Ui::ServiceViewer
     Q_OBJECT
 
 public:
-    ServiceViewer(Plasma::DataEngine *engine, const QString &m_source, QWidget \
*parent = 0); +    ServiceViewer(Plasma::DataEngine *engine, const QString &m_source, \
QWidget *parent = nullptr);  ~ServiceViewer();
 
 private:
diff --git a/engineexplorer/titlecombobox.h b/engineexplorer/titlecombobox.h
index fd9a503..2b036f2 100644
--- a/engineexplorer/titlecombobox.h
+++ b/engineexplorer/titlecombobox.h
@@ -30,7 +30,7 @@
 class TitleComboBox : public QComboBox
 {
 public:
-    TitleComboBox(QWidget *parent = 0)
+    TitleComboBox(QWidget *parent = nullptr)
         : QComboBox(parent)
     {
     }
diff --git a/lookandfeelexplorer/src/lnflistmodel.h \
b/lookandfeelexplorer/src/lnflistmodel.h index 857eb54..cc7941a 100644
--- a/lookandfeelexplorer/src/lnflistmodel.h
+++ b/lookandfeelexplorer/src/lnflistmodel.h
@@ -59,7 +59,7 @@ public:
            PackageVersionRole = Qt::UserRole + 3
          };
 
-    LnfListModel(QObject *parent = 0);
+    LnfListModel(QObject *parent = nullptr);
     virtual ~LnfListModel();
 
     virtual QHash<int, QByteArray> roleNames() const;
diff --git a/lookandfeelexplorer/src/lnflogic.cpp \
b/lookandfeelexplorer/src/lnflogic.cpp index 99fac44..05a7efe 100644
--- a/lookandfeelexplorer/src/lnflogic.cpp
+++ b/lookandfeelexplorer/src/lnflogic.cpp
@@ -481,7 +481,7 @@ void LnfLogic::processThumbnail(const QString &path)
 
 QString LnfLogic::openFile()
 {
-    return QFileDialog::getOpenFileName(0,
+    return QFileDialog::getOpenFileName(nullptr,
     i18n("Open Image"), \
QStandardPaths::writableLocation(QStandardPaths::HomeLocation), i18n("Image Files \
(*.png *.jpg *.bmp)"));  }
 
diff --git a/lookandfeelexplorer/src/lnflogic.h b/lookandfeelexplorer/src/lnflogic.h
index 262047d..0d845c1 100644
--- a/lookandfeelexplorer/src/lnflogic.h
+++ b/lookandfeelexplorer/src/lnflogic.h
@@ -57,7 +57,7 @@ public:
     };
     Q_ENUMS(ErrorLevel)
 
-    explicit LnfLogic(QObject *parent = 0);
+    explicit LnfLogic(QObject *parent = nullptr);
     ~LnfLogic();
 
     LnfListModel *lnfList();
diff --git a/plasmoidviewer/privateheaders/containmentview.h \
b/plasmoidviewer/privateheaders/containmentview.h index afdc689..8cf08e3 100644
--- a/plasmoidviewer/privateheaders/containmentview.h
+++ b/plasmoidviewer/privateheaders/containmentview.h
@@ -52,7 +52,7 @@ public:
      * @param corona the corona of this view
      * @param parent the QWindow this ContainmentView is parented to
      **/
-    explicit ContainmentView(Plasma::Corona *corona, QWindow *parent = 0);
+    explicit ContainmentView(Plasma::Corona *corona, QWindow *parent = nullptr);
     virtual ~ContainmentView();
 
     /**
diff --git a/plasmoidviewer/view.cpp b/plasmoidviewer/view.cpp
index c26900a..856832b 100644
--- a/plasmoidviewer/view.cpp
+++ b/plasmoidviewer/view.cpp
@@ -37,7 +37,7 @@ class ViewerCorona : public Plasma::Corona
 public:
     ViewerCorona()
         : Plasma::Corona(),
-          m_view(0)
+          m_view(nullptr)
     {}
 
     void setView(View *view)
@@ -98,7 +98,7 @@ void View::addApplet(const QString &applet)
         return;
     }
 
-    Plasma::Applet *a = 0;
+    Plasma::Applet *a = nullptr;
     if (metadataPath.isEmpty()) {
         a = containment()->createApplet(applet);
     } else {
@@ -313,7 +313,7 @@ void View::takeScreenShot()
             return;
         }
 
-        QString dest = QFileDialog::getSaveFileName(0, i18nc("@title:window", "Save \
Screenshot"), +        QString dest = QFileDialog::getSaveFileName(nullptr, \
                i18nc("@title:window", "Save Screenshot"),
                                                     QDir::homePath(), \
QStringLiteral("Images (*.png)"));  
         if (dest.isEmpty()) {
diff --git a/plasmoidviewer/view.h b/plasmoidviewer/view.h
index 8a750ff..fa1e654 100644
--- a/plasmoidviewer/view.h
+++ b/plasmoidviewer/view.h
@@ -29,7 +29,7 @@ class View : public PlasmaQuick::ContainmentView
     Q_PROPERTY(bool konsoleVisible READ konsoleVisible CONSTANT);
 
 public:
-    View(ViewerCorona *corona, bool konsoleVisible, QWindow *parent = 0);
+    View(ViewerCorona *corona, bool konsoleVisible, QWindow *parent = nullptr);
     ~View();
 
     void addApplet(const QString &applet);
diff --git a/themeexplorer/src/coloreditor.h b/themeexplorer/src/coloreditor.h
index 8c952b9..55c881c 100644
--- a/themeexplorer/src/coloreditor.h
+++ b/themeexplorer/src/coloreditor.h
@@ -51,7 +51,7 @@ class ColorEditor : public QObject
     Q_PROPERTY(QColor complementaryFocusColor READ complementaryFocusColor WRITE \
setComplementaryFocusColor NOTIFY colorsChanged)   public:
 
-    explicit ColorEditor(QObject *parent = 0);
+    explicit ColorEditor(QObject *parent = nullptr);
     ~ColorEditor();
 
     QString theme() const;
diff --git a/themeexplorer/src/themelistmodel.h b/themeexplorer/src/themelistmodel.h
index f20a323..40a2622 100644
--- a/themeexplorer/src/themelistmodel.h
+++ b/themeexplorer/src/themelistmodel.h
@@ -57,7 +57,7 @@ public:
            PackageVersionRole = Qt::UserRole + 3
          };
 
-    ThemeListModel(QObject *parent = 0);
+    ThemeListModel(QObject *parent = nullptr);
     virtual ~ThemeListModel();
 
     virtual QHash<int, QByteArray> roleNames() const;
diff --git a/themeexplorer/src/thememodel.h b/themeexplorer/src/thememodel.h
index cb9c94e..6fd4c31 100644
--- a/themeexplorer/src/thememodel.h
+++ b/themeexplorer/src/thememodel.h
@@ -59,7 +59,7 @@ public:
         FrameSvgPrefixes
     };
 
-    explicit ThemeModel(const KPackage::Package &package, QObject *parent = 0);
+    explicit ThemeModel(const KPackage::Package &package, QObject *parent = \
nullptr);  ~ThemeModel();
 
     ThemeListModel *themeList();


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

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