summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFriedrich W. H. Kossebau <kossebau@kde.org>2016-08-17 15:14:38 (GMT)
committerFriedrich W. H. Kossebau <kossebau@kde.org>2016-08-24 17:56:41 (GMT)
commit6547e5a1102414552701035a35a163a44c7342cb (patch)
treef59cf3d44973a2fcbaa7d9a65da3343ca445cc2a
parentbed44d4640a452924bb6c103963204b5d456df9b (diff)
No need to initialize QStrings with ""
-rw-r--r--src/lib/marble/MarbleDirs.cpp4
-rw-r--r--src/lib/marble/MarbleLegendBrowser.cpp4
-rw-r--r--src/lib/marble/MarbleModel.cpp2
-rw-r--r--src/lib/marble/geodata/data/GeoDataBalloonStyle.cpp1
-rw-r--r--src/lib/marble/geodata/data/GeoDataCoordinates.cpp4
-rw-r--r--src/lib/marble/geodata/data/GeoDataNetworkLinkControl.cpp5
-rw-r--r--src/lib/marble/geodata/data/GeoDataUpdate.cpp2
-rw-r--r--src/lib/marble/geodata/scene/GeoSceneIcon.cpp3
-rw-r--r--src/lib/marble/geodata/scene/GeoSceneSection.cpp3
-rw-r--r--src/plugins/render/crosshairs/CrosshairsPlugin.cpp2
-rw-r--r--src/plugins/render/photo/PhotoPluginModel.cpp10
11 files changed, 14 insertions, 26 deletions
diff --git a/src/lib/marble/MarbleDirs.cpp b/src/lib/marble/MarbleDirs.cpp
index ef98a7f..0f5f0a3 100644
--- a/src/lib/marble/MarbleDirs.cpp
+++ b/src/lib/marble/MarbleDirs.cpp
@@ -41,9 +41,9 @@ using namespace Marble;
namespace
{
- QString runTimeMarbleDataPath = "";
+ QString runTimeMarbleDataPath;
- QString runTimeMarblePluginPath = "";
+ QString runTimeMarblePluginPath;
}
MarbleDirs::MarbleDirs()
diff --git a/src/lib/marble/MarbleLegendBrowser.cpp b/src/lib/marble/MarbleLegendBrowser.cpp
index 4a46e25..c3038dd 100644
--- a/src/lib/marble/MarbleLegendBrowser.cpp
+++ b/src/lib/marble/MarbleLegendBrowser.cpp
@@ -258,7 +258,7 @@ void MarbleLegendBrowser::reverseSupportCheckboxes(QString &html)
{
const QString old = "<a href=\"checkbox:cities\"/>";
- QString checked = "";
+ QString checked;
if (d->m_checkBoxMap["cities"])
checked = "checked";
@@ -397,7 +397,7 @@ void MarbleLegendBrowser::setRadioCheckedProperty( const QString& value, const Q
#ifndef MARBLE_NO_WEBKITWIDGETS
QWebElement box = page()->mainFrame()->findFirstElement("input[value="+value+']');
QWebElementCollection boxes = page()->mainFrame()->findAllElements("input[name="+name+']');
- QString currentValue="";
+ QString currentValue;
for(int i=0; i<boxes.count(); ++i) {
currentValue = boxes.at(i).attribute("value");
d->m_checkBoxMap[currentValue]=false;
diff --git a/src/lib/marble/MarbleModel.cpp b/src/lib/marble/MarbleModel.cpp
index 1adaaba..78f668c 100644
--- a/src/lib/marble/MarbleModel.cpp
+++ b/src/lib/marble/MarbleModel.cpp
@@ -225,7 +225,7 @@ BookmarkManager *MarbleModel::bookmarkManager()
QString MarbleModel::mapThemeId() const
{
- QString mapThemeId = "";
+ QString mapThemeId;
if (d->m_mapTheme)
mapThemeId = d->m_mapTheme->head()->mapThemeId();
diff --git a/src/lib/marble/geodata/data/GeoDataBalloonStyle.cpp b/src/lib/marble/geodata/data/GeoDataBalloonStyle.cpp
index e8afaff..53d3815 100644
--- a/src/lib/marble/geodata/data/GeoDataBalloonStyle.cpp
+++ b/src/lib/marble/geodata/data/GeoDataBalloonStyle.cpp
@@ -30,7 +30,6 @@ public:
GeoDataBalloonStylePrivate::GeoDataBalloonStylePrivate() :
m_bgColor( Qt::white ),
m_textColor( Qt::black ),
- m_text( "" ),
m_mode( GeoDataBalloonStyle::Default )
{
}
diff --git a/src/lib/marble/geodata/data/GeoDataCoordinates.cpp b/src/lib/marble/geodata/data/GeoDataCoordinates.cpp
index ec4eb79..f55c06f 100644
--- a/src/lib/marble/geodata/data/GeoDataCoordinates.cpp
+++ b/src/lib/marble/geodata/data/GeoDataCoordinates.cpp
@@ -381,7 +381,7 @@ QString GeoDataCoordinates::toString( GeoDataCoordinates::Notation notation, int
int zoneNumber = GeoDataCoordinatesPrivate::lonLatToZone(d->m_lon, d->m_lat);
// Handle lack of UTM zone number in the poles
- QString zoneString = ( zoneNumber > 0 ) ? QString::number(zoneNumber) : QString("");
+ const QString zoneString = (zoneNumber > 0) ? QString::number(zoneNumber) : QString();
QString bandString = GeoDataCoordinatesPrivate::lonLatToLatitudeBand(d->m_lon, d->m_lat);
@@ -417,7 +417,7 @@ QString GeoDataCoordinates::lonToString( qreal lon, GeoDataCoordinates::Notation
int zoneNumber = GeoDataCoordinatesPrivate::lonLatToZone(lonRad, 0);
// Handle lack of UTM zone number in the poles
- QString result = ( zoneNumber > 0 ) ? QString::number(zoneNumber) : QString("");
+ QString result = (zoneNumber > 0) ? QString::number(zoneNumber) : QString();
if(precision > 0){
QString eastingString = QString::number( GeoDataCoordinatesPrivate::lonLatToEasting(lonRad, 0), 'f', 2 );
diff --git a/src/lib/marble/geodata/data/GeoDataNetworkLinkControl.cpp b/src/lib/marble/geodata/data/GeoDataNetworkLinkControl.cpp
index 5d7bfa3..9546d10 100644
--- a/src/lib/marble/geodata/data/GeoDataNetworkLinkControl.cpp
+++ b/src/lib/marble/geodata/data/GeoDataNetworkLinkControl.cpp
@@ -41,11 +41,6 @@ public:
GeoDataNetworkLinkControlPrivate::GeoDataNetworkLinkControlPrivate() :
m_minRefreshPeriod( 0.0 ),
m_maxSessionLength( 0.0 ),
- m_cookie( "" ),
- m_message( "" ),
- m_linkName( "" ),
- m_linkDescription( "" ),
- m_linkSnippet( "" ),
m_maxLines( 2 ),
m_expires(),
m_update(),
diff --git a/src/lib/marble/geodata/data/GeoDataUpdate.cpp b/src/lib/marble/geodata/data/GeoDataUpdate.cpp
index 05a5e53..ced3e18 100644
--- a/src/lib/marble/geodata/data/GeoDataUpdate.cpp
+++ b/src/lib/marble/geodata/data/GeoDataUpdate.cpp
@@ -27,7 +27,7 @@ public:
};
GeoDataUpdatePrivate::GeoDataUpdatePrivate() :
- m_create( 0 ), m_delete( 0 ), m_change( 0 ), m_targetHref( "" )
+ m_create( 0 ), m_delete( 0 ), m_change( 0 )
{
}
diff --git a/src/lib/marble/geodata/scene/GeoSceneIcon.cpp b/src/lib/marble/geodata/scene/GeoSceneIcon.cpp
index d8acbed..3a8bd26 100644
--- a/src/lib/marble/geodata/scene/GeoSceneIcon.cpp
+++ b/src/lib/marble/geodata/scene/GeoSceneIcon.cpp
@@ -25,8 +25,7 @@ namespace Marble
{
GeoSceneIcon::GeoSceneIcon()
- : m_pixmap( "" ),
- m_color()
+ : m_color()
{
}
diff --git a/src/lib/marble/geodata/scene/GeoSceneSection.cpp b/src/lib/marble/geodata/scene/GeoSceneSection.cpp
index 31f6c6f..7840f67 100644
--- a/src/lib/marble/geodata/scene/GeoSceneSection.cpp
+++ b/src/lib/marble/geodata/scene/GeoSceneSection.cpp
@@ -31,9 +31,6 @@ namespace Marble
GeoSceneSection::GeoSceneSection( const QString& name )
: m_name( name ),
- m_heading( "" ),
- m_connectTo( "" ),
- m_radio( "" ),
m_checkable( false ),
m_spacing( 12 )
{
diff --git a/src/plugins/render/crosshairs/CrosshairsPlugin.cpp b/src/plugins/render/crosshairs/CrosshairsPlugin.cpp
index 97145bc..d6dda19 100644
--- a/src/plugins/render/crosshairs/CrosshairsPlugin.cpp
+++ b/src/plugins/render/crosshairs/CrosshairsPlugin.cpp
@@ -31,7 +31,6 @@ CrosshairsPlugin::CrosshairsPlugin()
: RenderPlugin( 0 ),
m_svgobj( 0 ),
m_themeIndex( 0 ),
- m_theme( "" ),
m_configDialog( 0 ),
m_uiConfigWidget( 0 )
{
@@ -42,7 +41,6 @@ CrosshairsPlugin::CrosshairsPlugin( const MarbleModel *marbleModel )
m_isInitialized( false ),
m_svgobj( 0 ),
m_themeIndex( 0 ),
- m_theme( "" ),
m_configDialog( 0 ),
m_uiConfigWidget( 0 )
{
diff --git a/src/plugins/render/photo/PhotoPluginModel.cpp b/src/plugins/render/photo/PhotoPluginModel.cpp
index 8e16a09..f4506b8 100644
--- a/src/plugins/render/photo/PhotoPluginModel.cpp
+++ b/src/plugins/render/photo/PhotoPluginModel.cpp
@@ -43,8 +43,8 @@ QUrl PhotoPluginModel::generateUrl( const QString& service,
const QString& method,
const QHash<QString,QString>& options )
{
- QString url( "" );
-
+ QString url;
+
if (service == QLatin1String("flickr"))
url += "https://www.flickr.com/services/rest/";
else
@@ -77,7 +77,7 @@ void PhotoPluginModel::getAdditionalItems( const GeoDataLatLonAltBox& box,
}
if( box.west() <= box.east() ) {
- QString bbox( "" );
+ QString bbox;
bbox += QString::number( box.west() * RAD2DEG ) + ',';
bbox += QString::number( box.south() * RAD2DEG ) + ',';
bbox += QString::number( box.east() * RAD2DEG ) + ',';
@@ -93,7 +93,7 @@ void PhotoPluginModel::getAdditionalItems( const GeoDataLatLonAltBox& box,
}
else {
// Flickr api doesn't support bboxes with west > east so we have to split in two boxes
- QString bboxWest( "" );
+ QString bboxWest;
bboxWest += QString::number( box.west() * RAD2DEG ) + ',';
bboxWest += QString::number( box.south() * RAD2DEG ) + ',';
bboxWest += QString::number( 180 ) + ',';
@@ -108,7 +108,7 @@ void PhotoPluginModel::getAdditionalItems( const GeoDataLatLonAltBox& box,
downloadDescriptionFile( generateUrl( "flickr", "flickr.photos.search", optionsWest ) );
- QString bboxEast( "" );
+ QString bboxEast;
bboxEast += QString::number( -180 ) + ',';
bboxEast += QString::number( box.south() * RAD2DEG ) + ',';
bboxEast += QString::number( box.east() * RAD2DEG ) + ',';