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

List:       kde-commits
Subject:    [kcachegrind] /: Remove useless QString() -> directly use QString()
From:       Christian Ehrlicher <Ch.Ehrlicher () gmx ! de>
Date:       2016-11-21 18:44:47
Message-ID: E1c8taB-00066J-9U () code ! kde ! org
[Download RAW message or body]

Git commit 81e6aa6e77feaf2ec180eb8eb95d4a134d442c83 by Christian Ehrlicher.
Committed on 21/11/2016 at 18:42.
Pushed by chehrlic into branch 'master'.

Remove useless QString() -> directly use QString()
REVIEW: 129431

M  +0    -1    libcore/cachegrindloader.cpp
M  +1    -1    libcore/subcost.cpp
M  +4    -4    libviews/instrview.cpp
M  +1    -1    libviews/sourceview.cpp
M  +1    -1    libviews/treemap.cpp

http://commits.kde.org/kcachegrind/81e6aa6e77feaf2ec180eb8eb95d4a134d442c83

diff --git a/libcore/cachegrindloader.cpp b/libcore/cachegrindloader.cpp
index 92e3717..a0f73db 100644
--- a/libcore/cachegrindloader.cpp
+++ b/libcore/cachegrindloader.cpp
@@ -144,7 +144,6 @@ CachegrindLoader::CachegrindLoader()
   : Loader(QStringLiteral("Callgrind"),
            QObject::tr( "Import filter for Cachegrind/Callgrind generated profile data files") )
 {
-    _emptyString = QLatin1String("");
 }
 
 bool CachegrindLoader::canLoad(QIODevice* file)
diff --git a/libcore/subcost.cpp b/libcore/subcost.cpp
index 8982e10..8d1b20a 100644
--- a/libcore/subcost.cpp
+++ b/libcore/subcost.cpp
@@ -50,7 +50,7 @@ QString SubCost::pretty(char sep) const
     if (n==0) return QStringLiteral("0");
 
     int i = 0;
-    QString res = QLatin1String("");
+    QString res;
 
     while (n) {
 	if ((i>0) && !(i%3)) res = sep + res;
diff --git a/libviews/instrview.cpp b/libviews/instrview.cpp
index a75a55f..d386bc0 100644
--- a/libviews/instrview.cpp
+++ b/libviews/instrview.cpp
@@ -193,9 +193,9 @@ InstrView::InstrView(TraceItemView* parentView,
     headerLabels << tr( "#" )
                  << tr( "Cost" )
                  << tr( "Cost 2" )
-                 << QLatin1String("")
+                 << QString()
                  << tr( "Hex" )
-                 << QLatin1String("") // Mnenomic
+                 << QString() // Mnenomic
                  << tr( "Assembly Instructions" )
                  << tr( "Source Position" );
     setHeaderLabels(headerLabels);
@@ -1128,12 +1128,12 @@ bool InstrView::fillInstrRange(TraceFunction* function,
 	new InstrItem(this, this, 3, QStringLiteral("    %1").arg(objfile));
 	new InstrItem(this, this, 4,
 		      tr("does not seem to match the profile data file."));
-	new InstrItem(this, this, 5, QLatin1String(""));
+	new InstrItem(this, this, 5, QString());
 	new InstrItem(this, this, 6,
 		      tr("Are you using an old profile data file or is the above mentioned"));
 	new InstrItem(this, this, 7,
 		      tr("ELF object from an updated installation/another machine?"));
-	new InstrItem(this, this, 8, QLatin1String(""));
+	new InstrItem(this, this, 8, QString());
 	return false;
     }
 
diff --git a/libviews/sourceview.cpp b/libviews/sourceview.cpp
index 75e55ee..adef555 100644
--- a/libviews/sourceview.cpp
+++ b/libviews/sourceview.cpp
@@ -61,7 +61,7 @@ SourceView::SourceView(TraceItemView* parentView,
   headerLabels << tr( "#" )
                << tr( "Cost" )
                << tr( "Cost 2" )
-               << QLatin1String("")
+               << QString()
 	       <<  tr( "Source");
   setHeaderLabels(headerLabels);
 
diff --git a/libviews/treemap.cpp b/libviews/treemap.cpp
index 823a78a..1d0c5d3 100644
--- a/libviews/treemap.cpp
+++ b/libviews/treemap.cpp
@@ -1651,7 +1651,7 @@ void TreeMapWidget::setSelected(TreeMapItem* item, bool selected)
     redraw(changed);
 
     if (0) qDebug() << (selected ? "S":"Des") << "elected Item "
-		     << (item ? item->path(0).join(QLatin1String("")) : QStringLiteral("(null)"))
+		     << (item ? item->path(0).join(QString()) : QStringLiteral("(null)"))
 		     << " (depth " << (item ? item->depth() : -1)
 		     << ")";
 }
[prev in list] [next in list] [prev in thread] [next in thread] 

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