summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFriedrich W. H. Kossebau <kossebau@kde.org>2016-09-02 14:56:32 (GMT)
committerFriedrich W. H. Kossebau <kossebau@kde.org>2016-09-02 15:09:34 (GMT)
commit5ab8e573f1d5613437d62aa63efa294529900df2 (patch)
tree512fe833350a9ed1e04606d4ae619759522d7a11
parent08609a15d8fdad2b41bc8a9494bc9d873c8f22db (diff)
Use QStringLiteral for errorstring templates
-rw-r--r--src/plugins/runner/cache/CacheRunner.cpp4
-rw-r--r--src/plugins/runner/gpsbabel/GpsbabelRunner.cpp6
-rw-r--r--src/plugins/runner/json/JsonRunner.cpp4
-rw-r--r--src/plugins/runner/log/LogRunner.cpp2
-rw-r--r--src/plugins/runner/pn2/Pn2Runner.cpp4
-rw-r--r--src/plugins/runner/pnt/PntRunner.cpp4
-rw-r--r--src/plugins/runner/shp/ShpRunner.cpp4
7 files changed, 14 insertions, 14 deletions
diff --git a/src/plugins/runner/cache/CacheRunner.cpp b/src/plugins/runner/cache/CacheRunner.cpp
index 0504ba7..368377a 100644
--- a/src/plugins/runner/cache/CacheRunner.cpp
+++ b/src/plugins/runner/cache/CacheRunner.cpp
@@ -36,7 +36,7 @@ GeoDataDocument* CacheRunner::parseFile( const QString &fileName, DocumentRole r
{
QFile file( fileName );
if ( !file.exists() ) {
- error = QString("File %1 does not exist").arg(fileName);
+ error = QStringLiteral("File %1 does not exist").arg(fileName);
mDebug() << error;
return nullptr;
}
@@ -55,7 +55,7 @@ GeoDataDocument* CacheRunner::parseFile( const QString &fileName, DocumentRole r
qint32 version;
in >> version;
if ( version < 015 ) {
- error = QString("Bad cache file %1: Version %2 is too old, need 15 or later").arg(fileName).arg(version);
+ error = QStringLiteral("Bad cache file %1: Version %2 is too old, need 15 or later").arg(fileName).arg(version);
mDebug() << error;
return nullptr;
}
diff --git a/src/plugins/runner/gpsbabel/GpsbabelRunner.cpp b/src/plugins/runner/gpsbabel/GpsbabelRunner.cpp
index 2977c02..e512771 100644
--- a/src/plugins/runner/gpsbabel/GpsbabelRunner.cpp
+++ b/src/plugins/runner/gpsbabel/GpsbabelRunner.cpp
@@ -32,7 +32,7 @@ GeoDataDocument *GpsbabelRunner::parseFile(const QString &fileName, DocumentRole
{
// Check and see if the file exists
if ( !QFileInfo( fileName ).exists() ) {
- error = QString("File %1 does not exist").arg(fileName);
+ error = QStringLiteral("File %1 does not exist").arg(fileName);
mDebug() << error;
return nullptr;
}
@@ -51,7 +51,7 @@ GeoDataDocument *GpsbabelRunner::parseFile(const QString &fileName, DocumentRole
fileTypes["csv"] = "csv";
QString const inputFileType = fileTypes[fileSuffix];
if ( inputFileType.isEmpty() ) {
- error = QString("Unsupported file extension for").arg(fileName);
+ error = QStringLiteral("Unsupported file extension for").arg(fileName);
mDebug() << error;
return nullptr;
}
@@ -83,7 +83,7 @@ GeoDataDocument *GpsbabelRunner::parseFile(const QString &fileName, DocumentRole
document->setDocumentRole( role );
return document;
} else {
- error = QString("Gpsbabel returned error code %1").arg(exitStatus);
+ error = QStringLiteral("Gpsbabel returned error code %1").arg(exitStatus);
mDebug() << error;
return nullptr;
}
diff --git a/src/plugins/runner/json/JsonRunner.cpp b/src/plugins/runner/json/JsonRunner.cpp
index b76ba93..f7da32b 100644
--- a/src/plugins/runner/json/JsonRunner.cpp
+++ b/src/plugins/runner/json/JsonRunner.cpp
@@ -33,7 +33,7 @@ GeoDataDocument *JsonRunner::parseFile(const QString &fileName, DocumentRole rol
// Check file exists
QFile file( fileName );
if ( !file.exists() ) {
- error = QString("File %1 does not exist").arg(fileName);
+ error = QStringLiteral("File %1 does not exist").arg(fileName);
mDebug() << error;
return nullptr;
}
@@ -46,7 +46,7 @@ GeoDataDocument *JsonRunner::parseFile(const QString &fileName, DocumentRole rol
// Start parsing
if ( !parser.read( &file ) ) {
- error = QString("Could not parse GeoJSON from %1").arg(fileName);
+ error = QStringLiteral("Could not parse GeoJSON from %1").arg(fileName);
mDebug() << error;
return nullptr;
}
diff --git a/src/plugins/runner/log/LogRunner.cpp b/src/plugins/runner/log/LogRunner.cpp
index 5081322..56b8518 100644
--- a/src/plugins/runner/log/LogRunner.cpp
+++ b/src/plugins/runner/log/LogRunner.cpp
@@ -32,7 +32,7 @@ GeoDataDocument *LogRunner::parseFile(const QString &fileName, DocumentRole role
{
QFile file( fileName );
if ( !file.exists() ) {
- errorString = QString("File %1 does not exist").arg(fileName);
+ errorString = QStringLiteral("File %1 does not exist").arg(fileName);
mDebug() << errorString;
return nullptr;
}
diff --git a/src/plugins/runner/pn2/Pn2Runner.cpp b/src/plugins/runner/pn2/Pn2Runner.cpp
index 9070bc6..9664b33 100644
--- a/src/plugins/runner/pn2/Pn2Runner.cpp
+++ b/src/plugins/runner/pn2/Pn2Runner.cpp
@@ -120,14 +120,14 @@ GeoDataDocument *Pn2Runner::parseFile(const QString &fileName, DocumentRole role
{
QFileInfo fileinfo( fileName );
if (fileinfo.suffix().compare(QLatin1String("pn2"), Qt::CaseInsensitive) != 0) {
- error = QString("File %1 does not have a pn2 suffix").arg(fileName);
+ error = QStringLiteral("File %1 does not have a pn2 suffix").arg(fileName);
mDebug() << error;
return nullptr;
}
QFile file( fileName );
if ( !file.exists() ) {
- error = QString("File %1 does not exist").arg(fileName);
+ error = QStringLiteral("File %1 does not exist").arg(fileName);
mDebug() << error;
return nullptr;
}
diff --git a/src/plugins/runner/pnt/PntRunner.cpp b/src/plugins/runner/pnt/PntRunner.cpp
index ebcc129..7a8a4c8 100644
--- a/src/plugins/runner/pnt/PntRunner.cpp
+++ b/src/plugins/runner/pnt/PntRunner.cpp
@@ -40,14 +40,14 @@ GeoDataDocument *PntRunner::parseFile(const QString &fileName, DocumentRole role
{
QFileInfo fileinfo( fileName );
if (fileinfo.suffix().compare(QLatin1String("pnt"), Qt::CaseInsensitive) != 0) {
- errorString = QString("File %1 does not have a pnt suffix").arg(fileName);
+ errorString = QStringLiteral("File %1 does not have a pnt suffix").arg(fileName);
mDebug() << errorString;
return nullptr;
}
QFile file( fileName );
if ( !file.exists() ) {
- errorString = QString("File %1 does not exist").arg(fileName);
+ errorString = QStringLiteral("File %1 does not exist").arg(fileName);
mDebug() << errorString;
return nullptr;
}
diff --git a/src/plugins/runner/shp/ShpRunner.cpp b/src/plugins/runner/shp/ShpRunner.cpp
index fd6800e..5937e75 100644
--- a/src/plugins/runner/shp/ShpRunner.cpp
+++ b/src/plugins/runner/shp/ShpRunner.cpp
@@ -38,14 +38,14 @@ GeoDataDocument *ShpRunner::parseFile(const QString &fileName, DocumentRole role
{
QFileInfo fileinfo( fileName );
if (fileinfo.suffix().compare(QLatin1String("shp"), Qt::CaseInsensitive) != 0) {
- error = QString("File %1 does not have a shp suffix").arg(fileName);
+ error = QStringLiteral("File %1 does not have a shp suffix").arg(fileName);
mDebug() << error;
return nullptr;
}
SHPHandle handle = SHPOpen( fileName.toStdString().c_str(), "rb" );
if ( !handle ) {
- error = QString("Failed to read %1").arg(fileName);
+ error = QStringLiteral("Failed to read %1").arg(fileName);
mDebug() << error;
return nullptr;
}