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

Use QStringLiteral with QIcon ids

parent 61da9616
......@@ -751,7 +751,7 @@ void MarblePart::setupActions()
m_copyCoordinatesAction );
m_copyCoordinatesAction->setText( i18nc( "Action for copying the coordinates to the clipboard",
"C&opy Coordinates" ) );
m_copyCoordinatesAction->setIcon( QIcon( ":/icons/copy-coordinates.png" ) );
m_copyCoordinatesAction->setIcon(QIcon(QStringLiteral(":/icons/copy-coordinates.png")));
connect( m_copyCoordinatesAction, SIGNAL(triggered(bool)),
this, SLOT(copyCoordinates()) );
......@@ -777,7 +777,7 @@ void MarblePart::setupActions()
m_mapWizardAct = new QAction( i18nc( "Action for creating new maps",
"&Create a New Map..." ),
this );
m_mapWizardAct->setIcon( QIcon( ":/icons/create-new-map.png" ) );
m_mapWizardAct->setIcon(QIcon(QStringLiteral(":/icons/create-new-map.png")));
actionCollection()->addAction( "createMap", m_mapWizardAct );
m_mapWizardAct->setStatusTip( i18nc( "Status tip",
"A wizard guides you through the creation of your own map theme." ) );
......@@ -806,7 +806,7 @@ void MarblePart::setupActions()
actionCollection()->addAction( "show_clouds", m_showCloudsAction );
m_showCloudsAction->setCheckable( true );
m_showCloudsAction->setChecked( true );
m_showCloudsAction->setIcon( QIcon( ":/icons/clouds.png" ) );
m_showCloudsAction->setIcon(QIcon(QStringLiteral(":/icons/clouds.png")));
m_showCloudsAction->setText( i18nc( "Action for toggling clouds", "&Clouds" ) );
connect( m_showCloudsAction, SIGNAL(triggered(bool)),
this, SLOT(setShowClouds(bool)) );
......@@ -823,7 +823,7 @@ void MarblePart::setupActions()
// Action: Show Time options
m_controlTimeAction = new QAction( this );
actionCollection()->addAction( "control_time", m_controlTimeAction );
m_controlTimeAction->setIcon( QIcon( ":/icons/clock.png" ) );
m_controlTimeAction->setIcon(QIcon(QStringLiteral(":/icons/clock.png")));
m_controlTimeAction->setText( i18nc( "Action for time control dialog", "&Time Control..." ) );
connect( m_controlTimeAction, SIGNAL(triggered(bool)),
this, SLOT(controlTime()) );
......@@ -834,7 +834,7 @@ void MarblePart::setupActions()
m_lockFloatItemsAct );
m_lockFloatItemsAct->setText( i18nc( "Action for locking float items on the map",
"Lock Position" ) );
m_lockFloatItemsAct->setIcon( QIcon( ":/icons/unlock.png" ) );
m_lockFloatItemsAct->setIcon(QIcon(QStringLiteral(":/icons/unlock.png")));
m_lockFloatItemsAct->setCheckable( true );
m_lockFloatItemsAct->setChecked( false );
connect( m_lockFloatItemsAct, SIGNAL(triggered(bool)),
......@@ -845,7 +845,7 @@ void MarblePart::setupActions()
//Toggle Action: Show sun shadow
m_showShadow = new KToggleAction( i18n( "Show Shadow" ), this );
m_showShadow->setIcon( QIcon( "" ) ); // Fixme: Add Icon
// m_showShadow->setIcon(QIcon(QStringLiteral(""))); // Fixme: Add Icon
actionCollection()->addAction( "sun_shadow", m_showShadow );
m_showShadow->setCheckedState( KGuiItem( i18n( "Hide Shadow" ) ) );
m_showShadow->setToolTip(i18n("Shows and hides the shadow of the sun"));
......@@ -879,7 +879,7 @@ void MarblePart::setupActions()
m_addBookmarkAction = new QAction( this );
actionCollection()->addAction( "add_bookmark", m_addBookmarkAction );
m_addBookmarkAction->setText( i18nc( "Add Bookmark", "&Add Bookmark" ) );
m_addBookmarkAction->setIcon( QIcon( ":/icons/bookmark-new.png" ) );
m_addBookmarkAction->setIcon(QIcon(QStringLiteral(":/icons/bookmark-new.png")));
actionCollection()->setDefaultShortcut( m_addBookmarkAction, Qt::CTRL + Qt::Key_B );
connect( m_addBookmarkAction, SIGNAL(triggered()),
this, SLOT(openEditBookmarkDialog()) );
......@@ -903,7 +903,7 @@ void MarblePart::setupActions()
m_manageBookmarksAction = new QAction( this );
actionCollection()->addAction( "manage_bookmarks", m_manageBookmarksAction );
m_manageBookmarksAction->setText( i18nc( "Manage Bookmarks", "&Manage Bookmarks" ) );
m_manageBookmarksAction->setIcon( QIcon( ":/icons/bookmarks-organize.png" ) );
m_manageBookmarksAction->setIcon(QIcon(QStringLiteral(":/icons/bookmarks-organize.png")));
connect( m_manageBookmarksAction, SIGNAL(triggered()),
this, SLOT(openManageBookmarksDialog()) );
......@@ -915,7 +915,7 @@ void MarblePart::setupActions()
m_externalMapEditorAction = new QAction( this );
actionCollection()->addAction( "external_editor", m_externalMapEditorAction );
m_externalMapEditorAction->setText( i18nc( "Edit the map in an external application", "&Edit Map" ) );
m_externalMapEditorAction->setIcon( QIcon( ":/icons/edit-map.png" ) );
m_externalMapEditorAction->setIcon(QIcon(QStringLiteral(":/icons/edit-map.png")));
actionCollection()->setDefaultShortcut( m_externalMapEditorAction, Qt::CTRL + Qt::Key_E );
connect( m_externalMapEditorAction, SIGNAL(triggered()),
m_controlView, SLOT(launchExternalMapEditor()) );
......@@ -926,7 +926,7 @@ void MarblePart::setupActions()
actionCollection()->addAction( "record_movie" , m_recordMovieAction );
m_recordMovieAction->setStatusTip( i18n( "Records a movie of the globe" ) );
actionCollection()->setDefaultShortcut( m_recordMovieAction, Qt::CTRL + Qt::SHIFT + Qt::Key_R );
m_recordMovieAction->setIcon( QIcon( ":/icons/animator.png" ) );
m_recordMovieAction->setIcon(QIcon(QStringLiteral(":/icons/animator.png")));
connect( m_recordMovieAction, SIGNAL(triggered()),
this, SLOT(showMovieCaptureDialog()) );
......
......@@ -182,7 +182,7 @@ MainWindow::MainWindow(const QString& marbleDataPath, const QVariantMap& cmdLine
m_controlView = new ControlView( this );
setWindowIcon( QIcon(":/icons/marble.png") );
setWindowIcon(QIcon(QStringLiteral(":/icons/marble.png")));
setCentralWidget( m_controlView );
// Initializing config dialog
......@@ -264,16 +264,16 @@ void MainWindow::initObject(const QVariantMap& cmdLineSettings)
void MainWindow::createActions()
{
m_openAction = new QAction( QIcon(":/icons/document-open.png"), tr( "&Open..."), this );
m_openAction = new QAction(QIcon(QStringLiteral(":/icons/document-open.png")), tr("&Open..."), this);
m_openAction->setShortcut( tr( "Ctrl+O" ) );
m_openAction->setStatusTip( tr( "Open a file for viewing on Marble"));
connect( m_openAction, SIGNAL(triggered()),
this, SLOT(openFile()) );
m_downloadAction = new QAction( QIcon(":/icons/get-hot-new-stuff.png"), tr("&Download Maps..."), this);
m_downloadAction = new QAction(QIcon(QStringLiteral(":/icons/get-hot-new-stuff.png")), tr("&Download Maps..."), this);
connect(m_downloadAction, SIGNAL(triggered()), this, SLOT(openMapDialog()));
m_exportMapAction = new QAction( QIcon(":/icons/document-save-as.png"), tr("&Export Map..."), this);
m_exportMapAction = new QAction(QIcon(QStringLiteral(":/icons/document-save-as.png")), tr("&Export Map..."), this);
m_exportMapAction->setShortcut(tr("Ctrl+S"));
m_exportMapAction->setStatusTip(tr("Save a screenshot of the map"));
connect(m_exportMapAction, SIGNAL(triggered()), this, SLOT(exportMapScreenShot()));
......@@ -283,26 +283,26 @@ void MainWindow::createActions()
m_downloadRegionAction->setStatusTip( tr( "Download a map region in different zoom levels for offline usage" ) );
connect( m_downloadRegionAction, SIGNAL(triggered()), SLOT(showDownloadRegionDialog()) );
m_printAction = new QAction( QIcon(":/icons/document-print.png"), tr("&Print..."), this);
m_printAction = new QAction(QIcon(QStringLiteral(":/icons/document-print.png")), tr("&Print..."), this);
m_printAction->setShortcut(tr("Ctrl+P"));
m_printAction->setStatusTip(tr("Print a screenshot of the map"));
connect(m_printAction, SIGNAL(triggered()), this, SLOT(printMapScreenShot()));
m_printPreviewAction = new QAction( QIcon(":/icons/document-print-preview.png"), tr("Print Previe&w ..."), this);
m_printPreviewAction = new QAction(QIcon(QStringLiteral(":/icons/document-print-preview.png")), tr("Print Previe&w ..."), this);
m_printPreviewAction->setStatusTip(tr("Print a screenshot of the map"));
connect(m_printPreviewAction, SIGNAL(triggered()), m_controlView, SLOT(printPreview()));
m_quitAction = new QAction( QIcon(":/icons/application-exit.png"), tr("&Quit"), this);
m_quitAction = new QAction(QIcon(QStringLiteral(":/icons/application-exit.png")), tr("&Quit"), this);
m_quitAction->setShortcut(tr("Ctrl+Q"));
m_quitAction->setStatusTip(tr("Quit the Application"));
connect(m_quitAction, SIGNAL(triggered()), this, SLOT(close()));
m_copyMapAction = new QAction( QIcon(":/icons/edit-copy.png"), tr("&Copy Map"), this);
m_copyMapAction = new QAction(QIcon(QStringLiteral(":/icons/edit-copy.png")), tr("&Copy Map"), this);
m_copyMapAction->setShortcut(tr("Ctrl+C"));
m_copyMapAction->setStatusTip(tr("Copy a screenshot of the map"));
connect(m_copyMapAction, SIGNAL(triggered()), this, SLOT(copyMap()));
m_osmEditAction = new QAction( QIcon(":/icons/edit-map.png"), tr( "&Edit Map" ), this );
m_osmEditAction = new QAction(QIcon(QStringLiteral(":/icons/edit-map.png")), tr("&Edit Map"), this );
m_osmEditAction->setShortcut(tr( "Ctrl+E" ) );
m_osmEditAction->setStatusTip(tr( "Edit the current map region in an external editor" ) );
updateMapEditButtonVisibility( m_controlView->marbleWidget()->mapThemeId() );
......@@ -311,7 +311,7 @@ void MainWindow::createActions()
m_recordMovieAction = new QAction(tr("&Record Movie"), this);
m_recordMovieAction->setStatusTip(tr("Records a movie of the globe"));
m_recordMovieAction->setShortcut(QKeySequence("Ctrl+Shift+R"));
m_recordMovieAction->setIcon(QIcon(":/icons/animator.png"));
m_recordMovieAction->setIcon(QIcon(QStringLiteral(":/icons/animator.png")));
connect(m_recordMovieAction, SIGNAL(triggered()),
this, SLOT(showMovieCaptureDialog()));
......@@ -322,15 +322,15 @@ void MainWindow::createActions()
connect( m_stopRecordingAction, SIGNAL(triggered()),
this, SLOT(stopRecording()) );
m_configDialogAction = new QAction( QIcon(":/icons/settings-configure.png"),tr("&Configure Marble"), this);
m_configDialogAction = new QAction(QIcon(QStringLiteral(":/icons/settings-configure.png")), tr("&Configure Marble"), this);
m_configDialogAction->setStatusTip(tr("Show the configuration dialog"));
connect(m_configDialogAction, SIGNAL(triggered()), this, SLOT(editSettings()));
m_copyCoordinatesAction = new QAction( QIcon(":/icons/copy-coordinates.png"), tr("C&opy Coordinates"), this);
m_copyCoordinatesAction = new QAction(QIcon(QStringLiteral(":/icons/copy-coordinates.png")), tr("C&opy Coordinates"), this);
m_copyCoordinatesAction->setStatusTip(tr("Copy the center coordinates as text"));
connect(m_copyCoordinatesAction, SIGNAL(triggered()), this, SLOT(copyCoordinates()));
m_fullScreenAction = new QAction( QIcon(":/icons/view-fullscreen.png"), tr("&Full Screen Mode"), this);
m_fullScreenAction = new QAction(QIcon(QStringLiteral(":/icons/view-fullscreen.png")), tr("&Full Screen Mode"), this);
m_fullScreenAction->setShortcut(tr("Ctrl+Shift+F"));
m_fullScreenAction->setCheckable( true );
m_fullScreenAction->setStatusTip(tr("Full Screen Mode"));
......@@ -342,21 +342,21 @@ void MainWindow::createActions()
connect(m_statusBarAction, SIGNAL(triggered(bool)), this, SLOT(showStatusBar(bool)));
m_lockFloatItemsAction = new QAction( QIcon(":/icons/unlock.png"), tr("Lock Position"),this);
m_lockFloatItemsAction = new QAction(QIcon(QStringLiteral(":/icons/unlock.png")), tr("Lock Position"), this);
m_lockFloatItemsAction->setCheckable( true );
m_lockFloatItemsAction->setStatusTip(tr("Lock Position of Floating Items"));
connect(m_lockFloatItemsAction, SIGNAL(triggered(bool)), this, SLOT(lockPosition(bool)));
m_showCloudsAction = new QAction( QIcon(":/icons/clouds.png"), tr("&Clouds"), this);
m_showCloudsAction = new QAction(QIcon(QStringLiteral(":/icons/clouds.png")), tr("&Clouds"), this);
m_showCloudsAction->setCheckable( true );
m_showCloudsAction->setStatusTip(tr("Show Real Time Cloud Cover"));
connect(m_showCloudsAction, SIGNAL(triggered(bool)), this, SLOT(showClouds(bool)));
m_workOfflineAction = new QAction( QIcon(":/icons/user-offline.png"), tr("Work Off&line"), this);
m_workOfflineAction = new QAction(QIcon(QStringLiteral(":/icons/user-offline.png")), tr("Work Off&line"), this);
m_workOfflineAction->setCheckable( true );
connect(m_workOfflineAction, SIGNAL(triggered(bool)), this, SLOT(workOffline(bool)));
m_controlTimeAction = new QAction( QIcon(":/icons/clock.png"), tr( "&Time Control..." ), this );
m_controlTimeAction = new QAction(QIcon(QStringLiteral(":/icons/clock.png")), tr("&Time Control..."), this );
m_controlTimeAction->setStatusTip( tr( "Configure Time Control " ) );
connect( m_controlTimeAction, SIGNAL(triggered()), this, SLOT(controlTime()) );
......@@ -364,17 +364,17 @@ void MainWindow::createActions()
m_controlSunAction->setStatusTip( tr( "Configure Sun Control" ) );
connect( m_controlSunAction, SIGNAL(triggered()), this, SLOT(controlSun()) );
m_reloadAction = new QAction( QIcon(":/icons/view-refresh.png"), tr("&Redisplay"), this);
m_reloadAction = new QAction(QIcon(QStringLiteral(":/icons/view-refresh.png")), tr("&Redisplay"), this);
m_reloadAction->setShortcut(tr("F5"));
m_reloadAction->setStatusTip(tr("Reload Current Map"));
connect(m_reloadAction, SIGNAL(triggered()), this, SLOT(reload()));
m_handbookAction = new QAction( QIcon(":/icons/help-contents.png"), tr("Marble Virtual Globe &Handbook"), this);
m_handbookAction = new QAction(QIcon(QStringLiteral(":/icons/help-contents.png")), tr("Marble Virtual Globe &Handbook"), this);
m_handbookAction->setShortcut(tr("F1"));
m_handbookAction->setStatusTip(tr("Show the Handbook for Marble Virtual Globe"));
connect(m_handbookAction, SIGNAL(triggered()), this, SLOT(handbook()));
m_whatsThisAction = new QAction( QIcon(":/icons/help-whatsthis.png"), tr("What's &This"), this);
m_whatsThisAction = new QAction(QIcon(QStringLiteral(":/icons/help-whatsthis.png")), tr("What's &This"), this);
m_whatsThisAction->setShortcut(tr("Shift+F1"));
m_whatsThisAction->setStatusTip(tr("Show a detailed explanation of the action."));
connect(m_whatsThisAction, SIGNAL(triggered()), this, SLOT(enterWhatsThis()));
......@@ -383,7 +383,7 @@ void MainWindow::createActions()
m_forumAction->setStatusTip(tr("Visit Marble's Community Forum"));
connect(m_forumAction, SIGNAL(triggered()), this, SLOT(openForum()));
m_aboutMarbleAction = new QAction( QIcon(":/icons/marble.png"), tr("&About Marble Virtual Globe"), this);
m_aboutMarbleAction = new QAction(QIcon(QStringLiteral(":/icons/marble.png")), tr("&About Marble Virtual Globe"), this);
m_aboutMarbleAction->setStatusTip(tr("Show the application's About Box"));
connect(m_aboutMarbleAction, SIGNAL(triggered()), this, SLOT(aboutMarble()));
......@@ -392,12 +392,12 @@ void MainWindow::createActions()
connect(m_aboutQtAction, SIGNAL(triggered()), qApp, SLOT(aboutQt()));
//Bookmark Actions
m_addBookmarkAction = new QAction( QIcon(":/icons/bookmark-new.png"), tr("&Add Bookmark"),this);
m_addBookmarkAction = new QAction(QIcon(QStringLiteral(":/icons/bookmark-new.png")), tr("&Add Bookmark"), this);
m_addBookmarkAction->setShortcut(tr("Ctrl+B"));
m_addBookmarkAction->setStatusTip(tr("Add Bookmark"));
connect( m_addBookmarkAction, SIGNAL(triggered()), this, SLOT(openEditBookmarkDialog()) );
m_setHomeAction = new QAction( QIcon(":/icons/go-home.png"), tr( "&Set Home Location" ),this);
m_setHomeAction = new QAction(QIcon(QStringLiteral(":/icons/go-home.png")), tr("&Set Home Location"), this);
m_setHomeAction->setStatusTip( tr( "&Set Home Location" ) );
connect( m_setHomeAction, SIGNAL(triggered()), this, SLOT(setHome()) );
......@@ -406,12 +406,12 @@ void MainWindow::createActions()
m_toggleBookmarkDisplayAction->setCheckable( true );
connect( m_toggleBookmarkDisplayAction, SIGNAL(triggered(bool)), this, SLOT(showBookmarks(bool)) );
m_manageBookmarksAction = new QAction( QIcon( ":/icons/bookmarks-organize.png" ), tr( "&Manage Bookmarks" ), this);
m_manageBookmarksAction = new QAction(QIcon(QStringLiteral(":/icons/bookmarks-organize.png")), tr("&Manage Bookmarks"), this);
m_manageBookmarksAction->setStatusTip( tr( "Manage Bookmarks" ) );
connect( m_manageBookmarksAction, SIGNAL(triggered()), this, SLOT(manageBookmarks()) );
// Map Wizard action
m_mapWizardAction = new QAction( QIcon( ":/icons/create-new-map.png" ), tr("&Create a New Map..."), this );
m_mapWizardAction = new QAction(QIcon(QStringLiteral(":/icons/create-new-map.png")), tr("&Create a New Map..."), this);
m_mapWizardAction->setStatusTip( tr( "A wizard guides you through the creation of your own map theme." ) );
connect( m_mapWizardAction, SIGNAL(triggered()), SLOT(showMapWizard()) );
......@@ -601,7 +601,7 @@ void MainWindow::createBookmarkMenu()
m_bookmarkMenu->addSeparator();
m_bookmarkMenu->addAction( QIcon( ":/icons/go-home.png" ), "&Home",
m_bookmarkMenu->addAction( QIcon(QStringLiteral(":/icons/go-home.png")), tr("&Home"),
m_controlView->marbleWidget(), SLOT(goHome()) );
createFolderList( m_bookmarkMenu, m_controlView->marbleModel()->bookmarkManager()->document() );
}
......@@ -615,7 +615,7 @@ void MainWindow::createFolderList( QMenu *bookmarksListMenu, const GeoDataContai
}
else {
foreach ( const GeoDataFolder *folder, folders ) {
QMenu *subMenu = bookmarksListMenu->addMenu( QIcon( ":/icons/folder-bookmark.png" ), folder->name() );
QMenu *subMenu = bookmarksListMenu->addMenu(QIcon(QStringLiteral(":/icons/folder-bookmark.png")), folder->name());
createFolderList( subMenu, folder );
connect( subMenu, SIGNAL(triggered(QAction*)),
this, SLOT(lookAtBookmark(QAction*)) );
......
......@@ -229,7 +229,7 @@ QMenu* AbstractFloatItem::contextMenu()
{
d->m_contextMenu = new QMenu;
QAction *lockAction = d->m_contextMenu->addAction( QIcon(":/icons/unlock.png"), tr( "&Lock" ) );
QAction *lockAction = d->m_contextMenu->addAction(QIcon(QStringLiteral(":/icons/unlock.png")), tr("&Lock"));
lockAction->setCheckable( true );
lockAction->setChecked( positionLocked() );
connect( lockAction, SIGNAL(triggered(bool)), this, SLOT(setPositionLocked(bool)) );
......@@ -244,7 +244,7 @@ QMenu* AbstractFloatItem::contextMenu()
if( dialog )
{
d->m_contextMenu->addSeparator();
QAction *configAction = d->m_contextMenu->addAction( QIcon(":/icons/settings-configure.png"), tr( "&Configure..." ) );
QAction *configAction = d->m_contextMenu->addAction(QIcon(QStringLiteral(":/icons/settings-configure.png")), tr("&Configure..."));
connect( configAction, SIGNAL(triggered()), dialog, SLOT(exec()) );
}
}
......
......@@ -80,12 +80,12 @@ FlyToEditWidget::FlyToEditWidget( const QModelIndex &index, MarbleWidget* widget
layout->addLayout( pairLayout );
QToolButton* flyToPinCenter = new QToolButton;
flyToPinCenter->setIcon(QIcon(":/marble/places.png"));
flyToPinCenter->setIcon(QIcon(QStringLiteral(":/marble/places.png")));
flyToPinCenter->setToolTip(tr("Current map center"));
connect(flyToPinCenter, SIGNAL(clicked()), this, SLOT(updateCoordinates()));
layout->addWidget(flyToPinCenter);
m_button->setIcon( QIcon( ":/marble/document-save.png" ) );
m_button->setIcon(QIcon(QStringLiteral(":/marble/document-save.png")));
connect(m_button, SIGNAL(clicked()), this, SLOT(save()));
layout->addWidget( m_button );
......
......@@ -166,7 +166,7 @@ QVariant TargetModel::currentLocationData ( int role ) const
GeoDataCoordinates currentLocation = tracking->currentLocation();
switch( role ) {
case Qt::DisplayRole: return tr( "Current Location: %1" ).arg( currentLocation.toString() ) ;
case Qt::DecorationRole: return QIcon( ":/icons/gps.png" );
case Qt::DecorationRole: return QIcon(QStringLiteral(":/icons/gps.png"));
case MarblePlacemarkModel::CoordinateRole: {
return qVariantFromValue( currentLocation );
}
......@@ -195,7 +195,7 @@ QVariant TargetModel::homeData ( int role ) const
{
switch( role ) {
case Qt::DisplayRole: return tr( "Home" );
case Qt::DecorationRole: return QIcon( ":/icons/go-home.png" );
case Qt::DecorationRole: return QIcon(QStringLiteral(":/icons/go-home.png"));
case MarblePlacemarkModel::CoordinateRole: {
qreal lon( 0.0 ), lat( 0.0 );
int zoom( 0 );
......@@ -218,7 +218,7 @@ QVariant TargetModel::bookmarkData ( int index, int role ) const
return QString(folder->name() + QLatin1String(" / ") + m_bookmarks[index]->name());
}
}
case Qt::DecorationRole: return QIcon( ":/icons/bookmarks.png" );
case Qt::DecorationRole: return QIcon(QStringLiteral(":/icons/bookmarks.png"));
case MarblePlacemarkModel::CoordinateRole: return qVariantFromValue( m_bookmarks[index]->lookAt()->coordinates() );
}
......
......@@ -277,17 +277,17 @@ QStyleOptionButton MapItemDelegate::button( Element element, const QStyleOptionV
switch (element) {
case InstallButton:
result.text = tr( "Install" );
result.icon = QIcon( ":/marble/dialog-ok.png" );
result.icon = QIcon(QStringLiteral(":/marble/dialog-ok.png"));
result.iconSize = QSize( m_iconSize, m_iconSize );
break;
case UpgradeButton:
result.text = tr( "Update" );
result.icon = QIcon( ":/marble/system-software-update.png" );
result.icon = QIcon(QStringLiteral(":/marble/system-software-update.png"));
result.iconSize = QSize( m_iconSize, m_iconSize );
break;
case OpenButton:
result.text = tr( "Open" );
result.icon = QIcon( ":/marble/document-open.png" );
result.icon = QIcon(QStringLiteral(":/marble/document-open.png"));
result.iconSize = QSize( m_iconSize, m_iconSize );
break;
case CancelButton:
......@@ -295,7 +295,7 @@ QStyleOptionButton MapItemDelegate::button( Element element, const QStyleOptionV
break;
case RemoveButton:
result.text = tr( "Remove" );
result.icon = QIcon( ":/marble/edit-delete.png" );
result.icon = QIcon(QStringLiteral(":/marble/edit-delete.png"));
result.iconSize = QSize( m_iconSize, m_iconSize );
break;
default:
......
......@@ -107,19 +107,19 @@ class Q_DECL_HIDDEN MapViewWidget::Private {
m_toolBar = new QToolBar;
m_globeViewButton = new QToolButton;
m_globeViewButton->setIcon( QIcon(":/icons/map-globe.png") );
m_globeViewButton->setIcon(QIcon(QStringLiteral(":/icons/map-globe.png")));
m_globeViewButton->setToolTip( tr("Globe View") );
m_globeViewButton->setCheckable(true);
m_globeViewButton->setChecked(false);
m_globeViewAction = new QAction( QIcon(":/icons/map-globe.png"),
m_globeViewAction = new QAction(QIcon(QStringLiteral(":/icons/map-globe.png")),
tr( "Spherical view" ),
m_globeViewButton );
m_globeViewAction->setCheckable( true );
m_globeViewAction->setChecked( false );
m_mercatorViewButton = new QToolButton;
m_mercatorViewButton->setIcon( QIcon(":/icons/map-mercator.png") );
m_mercatorViewButton->setIcon(QIcon(QStringLiteral(":/icons/map-mercator.png")));
m_mercatorViewButton->setToolTip( tr("Mercator View") );
m_mercatorViewButton->setCheckable(true);
m_mercatorViewButton->setChecked(false);
......@@ -127,43 +127,43 @@ class Q_DECL_HIDDEN MapViewWidget::Private {
m_popupMenuFlat = new QMenu;
m_mercatorViewAction = new QAction( QIcon(":/icons/map-mercator.png"),
m_mercatorViewAction = new QAction(QIcon(QStringLiteral(":/icons/map-mercator.png")),
tr("Mercator View"),
m_popupMenuFlat );
m_mercatorViewAction->setCheckable(true);
m_mercatorViewAction->setChecked(false);
m_flatViewAction = new QAction( QIcon(":/icons/map-flat.png"),
m_flatViewAction = new QAction( QIcon(QStringLiteral(":/icons/map-flat.png")),
tr("Flat View"),
m_popupMenuFlat );
m_flatViewAction->setCheckable(true);
m_flatViewAction->setChecked(false);
m_gnomonicViewAction = new QAction( QIcon(":/icons/map-gnomonic.png"),
m_gnomonicViewAction = new QAction( QIcon(QStringLiteral(":/icons/map-gnomonic.png")),
tr( "Gnomonic view" ),
m_popupMenuFlat);
m_gnomonicViewAction->setCheckable( true );
m_gnomonicViewAction->setChecked( false );
m_stereographicViewAction = new QAction( QIcon(":/icons/map-globe.png"),
m_stereographicViewAction = new QAction(QIcon(QStringLiteral(":/icons/map-globe.png")),
tr( "Stereographic view" ),
m_popupMenuFlat);
m_stereographicViewAction->setCheckable( true );
m_stereographicViewAction->setChecked( false );
m_lambertAzimuthalViewAction = new QAction( QIcon(":/icons/map-globe.png"),
m_lambertAzimuthalViewAction = new QAction(QIcon(QStringLiteral(":/icons/map-globe.png")),
tr( "Lambert Azimuthal Equal-Area view" ),
m_popupMenuFlat);
m_lambertAzimuthalViewAction->setCheckable( true );
m_lambertAzimuthalViewAction->setChecked( false );
m_azimuthalEquidistantViewAction = new QAction( QIcon(":/icons/map-globe.png"),
m_azimuthalEquidistantViewAction = new QAction(QIcon(QStringLiteral(":/icons/map-globe.png")),
tr( "Azimuthal Equidistant view" ),
m_popupMenuFlat);
m_azimuthalEquidistantViewAction->setCheckable( true );
m_azimuthalEquidistantViewAction->setChecked( false );
m_verticalPerspectiveViewAction = new QAction( QIcon(":/icons/map-globe.png"),
m_verticalPerspectiveViewAction = new QAction(QIcon(QStringLiteral(":/icons/map-globe.png")),
tr( "Perspective Globe view" ),
m_popupMenuFlat);
m_verticalPerspectiveViewAction->setCheckable( true );
......@@ -642,12 +642,12 @@ void MapViewWidget::Private::showContextMenu( const QPoint& pos )
QAction* iconSizeAction = menu.addAction( tr( "&Show Large Icons" ), q, SLOT(toggleIconSize()) );
iconSizeAction->setCheckable( true );
iconSizeAction->setChecked( m_mapViewUi.marbleThemeSelectView->iconSize() == QSize( 96, 96 ) );
QAction *favAction = menu.addAction( QIcon( ":/icons/bookmarks.png" ), tr( "&Favorite" ), q, SLOT(toggleFavorite()) );
QAction *favAction = menu.addAction(QIcon(QStringLiteral(":/icons/bookmarks.png")), tr("&Favorite"), q, SLOT(toggleFavorite()));
favAction->setCheckable( true );
favAction->setChecked( isCurrentFavorite() );
menu.addSeparator();
menu.addAction( QIcon( ":/icons/create-new-map.png" ), tr("&Create a New Map..."), q, SIGNAL(showMapWizard()) );
menu.addAction(QIcon(QStringLiteral(":/icons/create-new-map.png")), tr("&Create a New Map..."), q, SIGNAL(showMapWizard()));
if( QFileInfo( MarbleDirs::localPath() + "/maps/" + currentThemePath() ).exists() )
menu.addAction( tr( "&Delete Map Theme" ), q, SLOT(deleteMap()) );
menu.addAction( tr( "&Upload Map..." ), q, SIGNAL(showUploadDialog()) );
......
......@@ -21,7 +21,7 @@ MarbleWebView::MarbleWebView(QWidget *parent) :
m_copyAction(new QAction(this))
{
m_copyAction->setText(tr("Copy"));
m_copyAction->setIcon(QIcon(":/icons/edit-copy.png"));
m_copyAction->setIcon(QIcon(QStringLiteral(":/icons/edit-copy.png")));
m_copyAction->setIconVisibleInMenu(true);
m_copyAction->setToolTip(tr("Copy selected content"));
connect(m_copyAction, SIGNAL(triggered()),
......
......@@ -109,7 +109,7 @@ MarbleWidgetPopupMenu::Private::Private( MarbleWidget *widget, const MarbleModel
m_rmbMenu( m_widget ),
m_directionsFromHereAction( 0 ),
m_directionsToHereAction( 0 ),
m_copyCoordinateAction( new QAction( QIcon(":/icons/copy-coordinates.png"), tr("Copy Coordinates"), parent ) ),
m_copyCoordinateAction(new QAction(QIcon(QStringLiteral(":/icons/copy-coordinates.png")), tr("Copy Coordinates"), parent)),
m_rmbExtensionPoint( 0 ),
m_runnerManager( model )
{
......@@ -126,12 +126,12 @@ MarbleWidgetPopupMenu::Private::Private( MarbleWidget *widget, const MarbleModel
int const lastIndex = qMax( 1, request->size()-1 );
m_directionsToHereAction->setIcon( QIcon( request->pixmap( lastIndex, 16 ) ) );
}
QAction* addBookmark = new QAction( QIcon(":/icons/bookmark-new.png"),
QAction* addBookmark = new QAction( QIcon(QStringLiteral(":/icons/bookmark-new.png")),
tr( "Add &Bookmark" ), parent );
QAction* fullscreenAction = new QAction( tr( "&Full Screen Mode" ), parent );
fullscreenAction->setCheckable( true );
QAction* aboutDialogAction = new QAction( QIcon(":/icons/marble.png"), tr( "&About" ), parent );
QAction* aboutDialogAction = new QAction(QIcon(QStringLiteral(":/icons/marble.png")), tr("&About"), parent);
QMenu* infoBoxMenu = createInfoBoxMenu();
......@@ -148,7 +148,7 @@ MarbleWidgetPopupMenu::Private::Private( MarbleWidget *widget, const MarbleModel
if ( !smallScreen ) {
m_rmbMenu.addAction( m_copyCoordinateAction );
}
m_rmbMenu.addAction( QIcon(":/icons/addressbook-details.png"), tr( "&Address Details" ), parent, SLOT(startReverseGeocoding()) );
m_rmbMenu.addAction(QIcon(QStringLiteral(":/icons/addressbook-details.png")), tr("&Address Details"), parent, SLOT(startReverseGeocoding()));
m_rmbMenu.addSeparator();
m_rmbMenu.addMenu( infoBoxMenu );
......
......@@ -149,8 +149,8 @@ QtMarbleConfigDialog::QtMarbleConfigDialog(MarbleWidget *marbleWidget, CloudSync
tabWidget->addTab( d->w_pluginSettings, tr( "Plugins" ) );
// Setting the icons for the plugin dialog.
d->w_pluginSettings->setAboutIcon( QIcon(":/icons/help-about.png") );
d->w_pluginSettings->setConfigIcon( QIcon(":/icons/settings-configure.png") );
d->w_pluginSettings->setAboutIcon(QIcon(QStringLiteral(":/icons/help-about.png")));
d->w_pluginSettings->setConfigIcon(QIcon(QStringLiteral(":/icons/settings-configure.png")));
connect( this, SIGNAL(rejected()), &d->m_pluginModel, SLOT(retrievePluginState()) );
connect( this, SIGNAL(accepted()), &d->m_pluginModel, SLOT(applyPluginState()) );
......
......@@ -41,7 +41,7 @@ RemoveItemEditWidget::RemoveItemEditWidget( const QModelIndex &index, QWidget *p
layout->addWidget( m_comboBox );
m_button->setIcon( QIcon( ":/marble/document-save.png" ) );
m_button->setIcon(QIcon(QStringLiteral(":/marble/document-save.png")));
connect(m_button, SIGNAL(clicked()), this, SLOT(save()));
layout->addWidget( m_button );
......
......@@ -42,11 +42,11 @@ SoundCueEditWidget::SoundCueEditWidget( const QModelIndex &index, QWidget *paren
m_lineEdit->setText( soundCueElement()->href() );
layout->addWidget( m_lineEdit );
m_button2->setIcon( QIcon( ":/marble/document-open.png" ) );
m_button2->setIcon(QIcon(QStringLiteral(":/marble/document-open.png")));
connect(m_button2, SIGNAL(clicked()), this, SLOT(open()));
layout->addWidget( m_button2 );
m_button->setIcon( QIcon( ":/marble/document-save.png" ) );
m_button->setIcon(QIcon(QStringLiteral(":/marble/document-save.png")));
connect(m_button, SIGNAL(clicked()), this, SLOT(save()));
layout->addWidget( m_button );
......
......@@ -49,7 +49,7 @@ TourControlEditWidget::TourControlEditWidget( const QModelIndex &index, QWidget
m_radio_pause->setChecked( true );
}
m_button->setIcon( QIcon( ":/marble/document-save.png" ) );
m_button->setIcon(QIcon(QStringLiteral(":/marble/document-save.png")));
connect(m_button, SIGNAL(clicked()), this, SLOT(save()));
layout->addWidget( m_button );
......
......@@ -95,18 +95,18 @@ void TourItemDelegate::paint( QPainter *painter, const QStyleOptionViewItem &opt
painter->setClipRect( 0, 0, labelRect.width(), labelRect.height() );
label.documentLayout()->draw( painter, paintContext );
painter->restore();
button.icon = QIcon( ":/marble/document-edit.png" );
button.icon = QIcon(QStringLiteral(":/marble/document-edit.png"));
QRect const buttonRect = position( EditButton, option );;
button.rect = buttonRect;
QIcon const icon = QIcon( ":/marble/media-playback-pause.png" );
QIcon const icon = QIcon(QStringLiteral(":/marble/media-playback-pause.png"));
painter->drawPixmap( iconRect, icon.pixmap( iconRect.size() ) );
} else if ( object->nodeType() == GeoDataTypes::GeoDataFlyToType && !m_editingIndices.contains( index ) ) {
GeoDataCoordinates const flyToCoords = index.data( MarblePlacemarkModel::CoordinateRole ).value<GeoDataCoordinates>();
label.setHtml( flyToCoords.toString() );
button.icon = QIcon( ":/marble/document-edit.png" );
button.icon = QIcon(QStringLiteral(":/marble/document-edit.png"));
painter->save();