Commit 05705f4f authored by Friedrich W. H. Kossebau's avatar Friedrich W. H. Kossebau
Browse files

Use QStringLiteral with all QString qrc ids

parent b527a095
......@@ -36,7 +36,7 @@ FlyToEditWidget::FlyToEditWidget( const QModelIndex &index, MarbleWidget* widget
layout->setSpacing( 5 );
QLabel* iconLabel = new QLabel;
iconLabel->setPixmap( QPixmap( ":/marble/flag.png" ) );
iconLabel->setPixmap(QPixmap(QStringLiteral(":/marble/flag.png")));
layout->addWidget( iconLabel );
QHBoxLayout *pairLayout = new QHBoxLayout;
......
......@@ -28,7 +28,8 @@
namespace Marble {
MapViewItemDelegate::MapViewItemDelegate( QListView *view ) :
m_view( view ), m_bookmarkIcon( ":/icons/bookmarks.png" )
m_view(view),
m_bookmarkIcon(QStringLiteral(":/icons/bookmarks.png"))
{
// nothing to do
}
......
......@@ -181,14 +181,14 @@ MarbleDefaultInputHandler::Private::Private()
m_midPressed(false),
m_dragThreshold(MarbleGlobal::getInstance()->profiles() & MarbleGlobal::SmallScreen ? 15 : 3)
{
m_curpmtl.load( ":/marble/cursor/tl.png");
m_curpmtc.load( ":/marble/cursor/tc.png");
m_curpmtr.load( ":/marble/cursor/tr.png");
m_curpmcr.load( ":/marble/cursor/cr.png");
m_curpmcl.load( ":/marble/cursor/cl.png");
m_curpmbl.load( ":/marble/cursor/bl.png");
m_curpmbc.load( ":/marble/cursor/bc.png");
m_curpmbr.load( ":/marble/cursor/br.png");
m_curpmtl.load(QStringLiteral(":/marble/cursor/tl.png"));
m_curpmtc.load(QStringLiteral(":/marble/cursor/tc.png"));
m_curpmtr.load(QStringLiteral(":/marble/cursor/tr.png"));
m_curpmcr.load(QStringLiteral(":/marble/cursor/cr.png"));
m_curpmcl.load(QStringLiteral(":/marble/cursor/cl.png"));
m_curpmbl.load(QStringLiteral(":/marble/cursor/bl.png"));
m_curpmbc.load(QStringLiteral(":/marble/cursor/bc.png"));
m_curpmbr.load(QStringLiteral(":/marble/cursor/br.png"));
m_arrowCur[0][0] = QCursor( m_curpmtl, 2, 2 );
m_arrowCur[1][0] = QCursor( m_curpmtc, 10, 3 );
......
......@@ -148,7 +148,7 @@ void MarbleLineEdit::updateClearButtonIcon( const QString& text )
QString const direction = layoutDirection() == Qt::LeftToRight ? "rtl" : "ltr";
int const size = (MarbleGlobal::getInstance()->profiles() & MarbleGlobal::SmallScreen) ? 32 : 16;
QPixmap pixmap = QPixmap( QString( ":/icons/%1x%1/edit-clear-locationbar-%2.png").arg( size ).arg( direction ) );
QPixmap pixmap = QPixmap(QStringLiteral(":/icons/%1x%1/edit-clear-locationbar-%2.png").arg(size).arg(direction));
d->m_clearButton->setPixmap( pixmap );
}
......
......@@ -183,7 +183,7 @@ void MarbleWidgetPopupMenu::Private::setupDialogOsm( PopupLayer *popup, const Ge
const GeoDataCoordinates location = placemark->coordinate();
popup->setCoordinates(location, Qt::AlignRight | Qt::AlignVCenter);
QFile descriptionFile(":/marble/webpopup/osm.html");
QFile descriptionFile(QStringLiteral(":/marble/webpopup/osm.html"));
if (!descriptionFile.open(QIODevice::ReadOnly)) {
return;
}
......@@ -354,7 +354,7 @@ void MarbleWidgetPopupMenu::Private::setupDialogCity( PopupLayer *popup, const G
const GeoDataCoordinates location = placemark->coordinate();
popup->setCoordinates(location, Qt::AlignRight | Qt::AlignVCenter);
QFile descriptionFile(":/marble/webpopup/city.html");
QFile descriptionFile(QStringLiteral(":/marble/webpopup/city.html"));
if (!descriptionFile.open(QIODevice::ReadOnly)) {
return;
}
......@@ -419,7 +419,7 @@ void MarbleWidgetPopupMenu::Private::setupDialogNation( PopupLayer *popup, const
const GeoDataCoordinates location = index->coordinate();
popup->setCoordinates(location, Qt::AlignRight | Qt::AlignVCenter);
QFile descriptionFile(":/marble/webpopup/nation.html");
QFile descriptionFile(QStringLiteral(":/marble/webpopup/nation.html"));
if (!descriptionFile.open(QIODevice::ReadOnly)) {
return;
}
......@@ -446,7 +446,7 @@ void MarbleWidgetPopupMenu::Private::setupDialogGeoPlaces( PopupLayer *popup, co
const GeoDataCoordinates location = index->coordinate();
popup->setCoordinates(location, Qt::AlignRight | Qt::AlignVCenter);
QFile descriptionFile(":/marble/webpopup/geoplace.html");
QFile descriptionFile(QStringLiteral(":/marble/webpopup/geoplace.html"));
if (!descriptionFile.open(QIODevice::ReadOnly)) {
return;
}
......@@ -468,7 +468,7 @@ void MarbleWidgetPopupMenu::Private::setupDialogSkyPlaces( PopupLayer *popup, co
const GeoDataCoordinates location = index->coordinate();
popup->setCoordinates(location, Qt::AlignRight | Qt::AlignVCenter);
QFile descriptionFile(":/marble/webpopup/skyplace.html");
QFile descriptionFile(QStringLiteral(":/marble/webpopup/skyplace.html"));
if (!descriptionFile.open(QIODevice::ReadOnly)) {
return;
}
......@@ -491,7 +491,7 @@ void MarbleWidgetPopupMenu::Private::setupDialogPhotoOverlay( PopupLayer *popup,
const GeoDataCoordinates location = index->point().coordinates();
popup->setCoordinates(location, Qt::AlignRight | Qt::AlignVCenter);
QFile descriptionFile(":/marble/webpopup/photooverlay.html");
QFile descriptionFile(QStringLiteral(":/marble/webpopup/photooverlay.html"));
if ( !descriptionFile.open(QIODevice::ReadOnly) ) {
return;
......
......@@ -32,7 +32,7 @@ RemoveItemEditWidget::RemoveItemEditWidget( const QModelIndex &index, QWidget *p
layout->setSpacing( 5 );
QLabel* iconLabel = new QLabel;
iconLabel->setPixmap( QPixmap( ":/icons/remove.png" ) );
iconLabel->setPixmap(QPixmap(QStringLiteral(":/icons/remove.png")));
layout->addWidget( iconLabel );
QLabel* comboBoxLabel = new QLabel;
......
......@@ -24,7 +24,7 @@ SearchInputWidget::SearchInputWidget( QWidget *parent ) :
m_areaSearch( false )
{
updatePlaceholderText();
QPixmap const decorator = QPixmap( ":/icons/16x16/edit-find.png" );
QPixmap const decorator = QPixmap(QStringLiteral(":/icons/16x16/edit-find.png"));
Q_ASSERT( !decorator.isNull() );
setDecorator( decorator );
......
......@@ -35,7 +35,7 @@ SoundCueEditWidget::SoundCueEditWidget( const QModelIndex &index, QWidget *paren
layout->setSpacing( 5 );
QLabel* iconLabel = new QLabel;
iconLabel->setPixmap( QPixmap( ":/marble/playback-play.png" ) );
iconLabel->setPixmap(QPixmap(QStringLiteral(":/marble/playback-play.png")));
layout->addWidget( iconLabel );
m_lineEdit->setPlaceholderText( "Audio location" );
......
......@@ -34,7 +34,7 @@ TourControlEditWidget::TourControlEditWidget( const QModelIndex &index, QWidget
layout->setSpacing( 5 );
QLabel* iconLabel = new QLabel;
iconLabel->setPixmap( QPixmap( ":/marble/media-playback-pause.png" ) );
iconLabel->setPixmap(QPixmap(QStringLiteral(":/marble/media-playback-pause.png")));
layout->addWidget( iconLabel );
layout->addWidget( m_radio_play );
......
......@@ -174,16 +174,16 @@ void TourItemDelegate::paint( QPainter *painter, const QStyleOptionViewItem &opt
if( container->size() > 0 ) {
label.setHtml( tr( "Create item %1" ).arg( container->first().id() ) );
ok = true;
iconString = ":/icons/add-placemark.png";
iconString = QStringLiteral(":/icons/add-placemark.png");
}
} else if( update && update->getDelete() && update->getDelete()->size() != 0 ){
label.setHtml( tr( "Remove item %1" ).arg( update->getDelete()->first().targetId() ) );
ok = true;
iconString = ":/icons/remove.png";
iconString = QStringLiteral(":/icons/remove.png");
} else if( update && update->change() && update->change()->size() != 0 ){
label.setHtml( tr( "Change item %1" ).arg( update->change()->first().targetId() ) );
ok = true;
iconString = ":/marble/document-edit.png";
iconString = QStringLiteral(":/marble/document-edit.png");
}
if( update && !ok ) {
label.setHtml( tr( "Update items" ) );
......
......@@ -34,7 +34,7 @@ WaitEditWidget::WaitEditWidget( const QModelIndex &index, QWidget *parent ) :
layout->setSpacing( 5 );
QLabel* iconLabel = new QLabel;
iconLabel->setPixmap( QPixmap( ":/marble/player-time.png" ) );
iconLabel->setPixmap(QPixmap(QStringLiteral(":/marble/player-time.png")));
layout->addWidget( iconLabel );
QLabel *waitLabel = new QLabel;
......
......@@ -237,7 +237,7 @@ void FrameGraphicsItem::paint( QPainter *painter )
{
QPixmap shadow;
if ( !QPixmapCache::find( "marble/frames/shadowframe.png", shadow ) ) {
shadow = QPixmap( ":/marble/frames/shadowframe.png" );
shadow = QPixmap(QStringLiteral(":/marble/frames/shadowframe.png"));
QPixmapCache::insert( "marble/frames/shadowframe.png", shadow );
}
qDrawBorderPixmap( painter, QRect( QPoint( 0, 0 ), size().toSize() ),
......
......@@ -161,7 +161,8 @@ public:
RoutingLayerPrivate::RoutingLayerPrivate( RoutingLayer *parent, MarbleWidget *widget ) :
q( parent ), m_movingIndex( -1 ), m_marbleWidget( widget ),
m_targetPixmap( ":/data/bitmaps/routing_pick.png" ), m_dragStopOverRightIndex( -1 ),
m_targetPixmap(QStringLiteral(":/data/bitmaps/routing_pick.png")),
m_dragStopOverRightIndex(-1),
m_routingModel( widget->model()->routingManager()->routingModel() ),
m_placemarkModel( 0 ),
m_selectionModel( 0 ),
......
......@@ -225,16 +225,16 @@ void CompassFloatItem::readSettings()
m_uiConfigWidget->m_themeList->setCurrentRow( m_themeIndex );
}
QString theme = ":/compass.svg";
QString theme = QStringLiteral(":/compass.svg");
switch( m_themeIndex ) {
case 1:
theme = ":/compass-arrows.svg";
theme = QStringLiteral(":/compass-arrows.svg");
break;
case 2:
theme = ":/compass-atom.svg";
theme = QStringLiteral(":/compass-atom.svg");
break;
case 3:
theme = ":/compass-magnet.svg";
theme = QStringLiteral(":/compass-magnet.svg");
break;
}
......
......@@ -169,19 +169,19 @@ void CrosshairsPlugin::readSettings()
m_uiConfigWidget->m_themeList->setCurrentRow( m_themeIndex );
}
m_theme = ":/crosshairs-darkened.png";
m_theme = QStringLiteral(":/crosshairs-darkened.png");
switch( m_themeIndex ) {
case 1:
m_theme = ":/crosshairs-gun1.svg";
m_theme = QStringLiteral(":/crosshairs-gun1.svg");
break;
case 2:
m_theme = ":/crosshairs-gun2.svg";
m_theme = QStringLiteral(":/crosshairs-gun2.svg");
break;
case 3:
m_theme = ":/crosshairs-circled.svg";
m_theme = QStringLiteral(":/crosshairs-circled.svg");
break;
case 4:
m_theme = ":/crosshairs-german.svg";
m_theme = QStringLiteral(":/crosshairs-german.svg");
break;
}
......
......@@ -82,7 +82,7 @@ void EarthquakeItem::paint( QPainter *painter )
painter->drawEllipse( arcRect );
// Draws the seismograph
QSvgRenderer renderer( QString( ":/seismograph.svg" ) );
QSvgRenderer renderer(QStringLiteral(":/seismograph.svg"));
renderer.render( painter, QRectF( 0.0, 0.0, width, height ) );
// Draws magnitude of the earthquake
......
......@@ -113,7 +113,7 @@ QIcon ElevationProfileMarker::icon() const
void ElevationProfileMarker::initialize()
{
m_markerIcon.setImage( QImage( ":/flag-red-mirrored.png" ) );
m_markerIcon.setImage(QImage(QStringLiteral(":/flag-red-mirrored.png")));
MarbleGraphicsGridLayout *topLayout = new MarbleGraphicsGridLayout( 1, 2 );
m_markerItem.setLayout( topLayout );
......
......@@ -36,7 +36,7 @@ namespace Marble
MeasureToolPlugin::MeasureToolPlugin( const MarbleModel *marbleModel )
: RenderPlugin( marbleModel ),
m_measureLineString( GeoDataLineString( Tessellate ) ),
m_mark( ":/mark.png" ),
m_mark(QStringLiteral(":/mark.png")),
#ifdef Q_OS_MACX
m_font_regular( QFont( QStringLiteral( "Sans Serif" ), 10, 50, false ) ),
#else
......
......@@ -116,7 +116,7 @@ void SatellitesMSCItem::setDescription()
QString::number( m_inc, 'f', 2 ),
QString::number( m_n0, 'f', 2 ) );*/
QFile templateFile(":/marble/satellites/satellite.html");
QFile templateFile(QStringLiteral(":/marble/satellites/satellite.html"));
if (!templateFile.open(QIODevice::ReadOnly)) {
placemark()->setDescription(QObject::tr("No info available."));
return;
......
......@@ -197,7 +197,7 @@ void SatellitesModel::parseCatalog( const QString &id,
// use special icon for moons
if (category == QLatin1String("Moons")) {
style->iconStyle().setIconPath( ":/icons/moon.png" );
style->iconStyle().setIconPath(QStringLiteral(":/icons/moon.png"));
} else {
style->iconStyle().setIconPath(MarbleDirs::path(QStringLiteral("bitmaps/satellite.png")));
}
......
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