Commit 6547e5a1 authored by Friedrich W. H. Kossebau's avatar Friedrich W. H. Kossebau
Browse files

No need to initialize QStrings with ""

parent bed44d46
......@@ -41,9 +41,9 @@ using namespace Marble;
namespace
{
QString runTimeMarbleDataPath = "";
QString runTimeMarbleDataPath;
QString runTimeMarblePluginPath = "";
QString runTimeMarblePluginPath;
}
MarbleDirs::MarbleDirs()
......
......@@ -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;
......
......@@ -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();
......
......@@ -30,7 +30,6 @@ public:
GeoDataBalloonStylePrivate::GeoDataBalloonStylePrivate() :
m_bgColor( Qt::white ),
m_textColor( Qt::black ),
m_text( "" ),
m_mode( GeoDataBalloonStyle::Default )
{
}
......
......@@ -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 );
......
......@@ -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(),
......
......@@ -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 )
{
}
......
......@@ -25,8 +25,7 @@ namespace Marble
{
GeoSceneIcon::GeoSceneIcon()
: m_pixmap( "" ),
m_color()
: m_color()
{
}
......
......@@ -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 )
{
......
......@@ -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 )
{
......
......@@ -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 ) + ',';
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment