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

List:       kde-commits
Subject:    [kcachegrind] /: QString::null -> QString()
From:       Christian Ehrlicher <Ch.Ehrlicher () gmx ! de>
Date:       2016-11-24 16:26:19
Message-ID: E1c9wqp-0002nL-2J () code ! kde ! org
[Download RAW message or body]

Git commit 88a6e6444341792002d784dc146031c6f07b1b07 by Christian Ehrlicher.
Committed on 24/11/2016 at 16:25.
Pushed by chehrlic into branch 'master'.

QString::null -> QString()
REVIEW: 129551

M  +1    -1    kcachegrind/toplevel.cpp
M  +1    -1    libcore/loader.h
M  +1    -1    libcore/tracedata.cpp
M  +3    -3    libviews/functionselection.cpp
M  +1    -1    libviews/tabview.cpp
M  +1    -1    libviews/tabview.h
M  +1    -1    qcachegrind/configdialog.cpp
M  +1    -1    qcachegrind/configdialog.h
M  +1    -1    qcachegrind/qcgconfig.cpp
M  +4    -4    qcachegrind/qcgtoplevel.cpp
M  +1    -1    qcachegrind/qcgtoplevel.h

https://commits.kde.org/kcachegrind/88a6e6444341792002d784dc146031c6f07b1b07

diff --git a/kcachegrind/toplevel.cpp b/kcachegrind/toplevel.cpp
index fc48c39..b93b9b5 100644
--- a/kcachegrind/toplevel.cpp
+++ b/kcachegrind/toplevel.cpp
@@ -145,7 +145,7 @@ TopLevel::TopLevel()
     setAutoSaveSettings();
 
     // restore current state settings (not configuration options)
-    restoreCurrentState(QString::null);	//krazy:exclude=nullstrassign for old broken gcc
+    restoreCurrentState(QString());
 
     // if this is the first toplevel, show tip of day
     if (memberList().count() == 1)
diff --git a/libcore/loader.h b/libcore/loader.h
index 1facd65..a47548d 100644
--- a/libcore/loader.h
+++ b/libcore/loader.h
@@ -79,7 +79,7 @@ protected:
     void loadProgress(int progress); // 0 - 100
     void loadError(int line, const QString& msg);
     void loadWarning(int line, const QString& msg);
-    void loadFinished(const QString &msg = QString::null);
+    void loadFinished(const QString &msg = QString());
 
 protected:
     Logger* _logger;
diff --git a/libcore/tracedata.cpp b/libcore/tracedata.cpp
index 7d351b6..75d8459 100644
--- a/libcore/tracedata.cpp
+++ b/libcore/tracedata.cpp
@@ -3389,7 +3389,7 @@ TraceClass* TraceData::cls(const QString& fnName, QString& shortName)
         lastIndex = index+2;
     }
 
-    QString clsName = (lastIndex < 3) ? QString::null :	//krazy:exclude=nullstrassign for old broken gcc
+    QString clsName = (lastIndex < 3) ? QString() :
                                         fnName.left(lastIndex-2);
     shortName = fnName.mid(lastIndex);
 
diff --git a/libviews/functionselection.cpp b/libviews/functionselection.cpp
index 723e69c..0195464 100644
--- a/libviews/functionselection.cpp
+++ b/libviews/functionselection.cpp
@@ -491,7 +491,7 @@ void FunctionSelection::doUpdate(int changeType, bool)
         }
 
         // reset search (as not activated from this view)
-        query(QString::null);	//krazy:exclude=nullstrassign for old broken gcc
+        query(QString());
 
         // select cost item group of function
         switch(_groupType) {
@@ -552,8 +552,8 @@ void FunctionSelection::doUpdate(int changeType, bool)
     }
 
     // reset searchEdit
-    _searchString = QString();
-    query(QString::null);	//krazy:exclude=nullstrassign for old broken gcc
+    _searchString.clear();
+    query(QString());
 
     refresh();
 }
diff --git a/libviews/tabview.cpp b/libviews/tabview.cpp
index 1134b82..5d32c4c 100644
--- a/libviews/tabview.cpp
+++ b/libviews/tabview.cpp
@@ -408,7 +408,7 @@ TabView::TabView(TraceItemView* parentView, QWidget* parent)
     this->setWhatsThis( whatsThis() );
 }
 
-void TabView::updateNameLabel(QString n)
+void TabView::updateNameLabel(const QString& n)
 {
     QFontMetrics fm(_nameLabel->fontMetrics());
 
diff --git a/libviews/tabview.h b/libviews/tabview.h
index 5684252..b213f24 100644
--- a/libviews/tabview.h
+++ b/libviews/tabview.h
@@ -163,7 +163,7 @@ private:
     TabWidget* tabWidget(Position);
     void updateVisibility();
     void doUpdate(int, bool);
-    void updateNameLabel(QString n = QString::null);
+    void updateNameLabel(const QString &n = QString());
     void installFocusFilters();
     void tabCounts(int&, int&, int&, int&);
 
diff --git a/qcachegrind/configdialog.cpp b/qcachegrind/configdialog.cpp
index c5c48cd..071e8b8 100644
--- a/qcachegrind/configdialog.cpp
+++ b/qcachegrind/configdialog.cpp
@@ -40,7 +40,7 @@
 // ConfigDialog
 //
 
-ConfigDialog::ConfigDialog(TraceData* data, QWidget* parent, QString s)
+ConfigDialog::ConfigDialog(TraceData* data, QWidget* parent, const QString &s)
     : QDialog(parent)
 {
     setWindowTitle(tr("Configure QCachegrind"));
diff --git a/qcachegrind/configdialog.h b/qcachegrind/configdialog.h
index 47d8886..eadd615 100644
--- a/qcachegrind/configdialog.h
+++ b/qcachegrind/configdialog.h
@@ -43,7 +43,7 @@ class ConfigDialog: public QDialog
 
 public:
     // If s is not empty, navigate to a given setting on opening
-    ConfigDialog(TraceData* data, QWidget* parent, QString s = QString::null);
+    ConfigDialog(TraceData* data, QWidget* parent, const QString &s = QString());
 
     void activate(QString);
     QString currentPage();
diff --git a/qcachegrind/qcgconfig.cpp b/qcachegrind/qcgconfig.cpp
index 41d1f9c..d37be9c 100644
--- a/qcachegrind/qcgconfig.cpp
+++ b/qcachegrind/qcgconfig.cpp
@@ -94,5 +94,5 @@ ConfigGroup* QCGConfigStorage::getGroup(const QString& group,
         return new QCGConfigGroup(_settings, group, true);
 
     // requested group does not exist, return only default values
-    return new QCGConfigGroup(0, QString::null, true);
+    return new QCGConfigGroup(0, QString(), true);
 }
diff --git a/qcachegrind/qcgtoplevel.cpp b/qcachegrind/qcgtoplevel.cpp
index 9d3e195..a897863 100644
--- a/qcachegrind/qcgtoplevel.cpp
+++ b/qcachegrind/qcgtoplevel.cpp
@@ -88,7 +88,7 @@ QCGTopLevel::QCGTopLevel()
     setCentralWidget(_multiView);
 
     // restore current state settings (not configuration options)
-    restoreCurrentState(QString::null);
+    restoreCurrentState(QString());
 
     // restore docks & toolbars from config
     QByteArray state, geometry;
@@ -666,7 +666,7 @@ void QCGTopLevel::about()
 
 void QCGTopLevel::configure(QString s)
 {
-    static QString lastPage = QString::null;
+    static QString lastPage;
 
     // if no specific config item should be focused, use last page
     if (s.isEmpty()) s = lastPage;
@@ -1704,7 +1704,7 @@ void QCGTopLevel::closeEvent(QCloseEvent* event)
     GlobalConfig::config()->saveOptions();
 
     saveTraceSettings();
-    saveCurrentState(QString::null);
+    saveCurrentState(QString());
 
     // if part dock was chosen visible even for only 1 part loaded,
     // keep this choice...
@@ -2054,7 +2054,7 @@ void QCGTopLevel::loadStart(const QString& filename)
 
 void QCGTopLevel::loadFinished(const QString& msg)
 {
-    showStatus(QString::null, 0);
+    showStatus(QString(), 0);
     if (!msg.isEmpty())
         showMessage(QStringLiteral("Error loading %1: %2").arg(_filename).arg(msg),
                     2000);
diff --git a/qcachegrind/qcgtoplevel.h b/qcachegrind/qcgtoplevel.h
index 4f014a1..e008c09 100644
--- a/qcachegrind/qcgtoplevel.h
+++ b/qcachegrind/qcgtoplevel.h
@@ -96,7 +96,7 @@ public slots:
 
     void exportGraph();
     void newWindow();
-    void configure(QString page = QString::null);
+    void configure(QString page = QString());
     void about();
 
     // layouts
[prev in list] [next in list] [prev in thread] [next in thread] 

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