From kde-commits Thu Nov 24 16:26:19 2016 From: Christian Ehrlicher Date: Thu, 24 Nov 2016 16:26:19 +0000 To: kde-commits Subject: [kcachegrind] /: QString::null -> QString() Message-Id: X-MARC-Message: https://marc.info/?l=kde-commits&m=148000478602021 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=3Dnullstrassign fo= r old broken gcc + restoreCurrentState(QString()); = // if this is the first toplevel, show tip of day if (memberList().count() =3D=3D 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 =3D QString::null); + void loadFinished(const QString &msg =3D 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, QSt= ring& shortName) lastIndex =3D index+2; } = - QString clsName =3D (lastIndex < 3) ? QString::null : //krazy:exclude= =3Dnullstrassign for old broken gcc + QString clsName =3D (lastIndex < 3) ? QString() : fnName.left(lastIndex-2); shortName =3D 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=3Dnullstrassign for old brok= en gcc + query(QString()); = // select cost item group of function switch(_groupType) { @@ -552,8 +552,8 @@ void FunctionSelection::doUpdate(int changeType, bool) } = // reset searchEdit - _searchString =3D QString(); - query(QString::null); //krazy:exclude=3Dnullstrassign for old broken g= cc + _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* pa= rent) 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 =3D QString::null); + void updateNameLabel(const QString &n =3D 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 =3D QString::= null); + ConfigDialog(TraceData* data, QWidget* parent, const QString &s =3D QS= tring()); = 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& gr= oup, 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 =3D QString::null; + static QString lastPage; = // if no specific config item should be focused, use last page if (s.isEmpty()) s =3D 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 =3D QString::null); + void configure(QString page =3D QString()); void about(); = // layouts