Commit 0b053e64 authored by Pierre Lamot's avatar Pierre Lamot Committed by Jean-Baptiste Kempf

qt: specify the image extension in Qt ressource keys for proper rendering of SVG with Qt5.6

this is workaround for https://bugreports.qt.io/browse/QTBUG-55388Signed-off-by: Jean-Baptiste Kempf's avatarJean-Baptiste Kempf <jb@videolan.org>
parent 2c62c0b5
......@@ -239,7 +239,7 @@ void ActionsManager::renderer_event_item_added( vlc_renderer_discovery_t*,
return; /* we already have this item */
}
QAction *action = new QAction( vlc_renderer_item_flags(p_item) & VLC_RENDERER_CAN_VIDEO ? QIcon( ":/sidebar/movie" ) : QIcon( ":/sidebar/music" ),
QAction *action = new QAction( vlc_renderer_item_flags(p_item) & VLC_RENDERER_CAN_VIDEO ? QIcon( ":/sidebar/movie.svg" ) : QIcon( ":/sidebar/music.svg" ),
vlc_renderer_item_name(p_item), VLCMenuBar::rendererMenu );
action->setCheckable(true);
......
......@@ -67,13 +67,13 @@ PrefsTree::PrefsTree( intf_thread_t *_p_intf, QWidget *_parent,
/* Nice icons */
#define BI( a,b) QIcon a##_icon = QIcon( b )
BI( audio, ":/prefsmenu/advanced/audio" );
BI( video, ":/prefsmenu/advanced/video" );
BI( input, ":/prefsmenu/advanced/codec" );
BI( sout, ":/prefsmenu/advanced/sout" );
BI( advanced, ":/prefsmenu/advanced/extended" );
BI( playlist, ":/prefsmenu/advanced/playlist" );
BI( interface, ":/prefsmenu/advanced/intf" );
BI( audio, ":/prefsmenu/advanced/audio.svg" );
BI( video, ":/prefsmenu/advanced/video.svg" );
BI( input, ":/prefsmenu/advanced/codec.svg" );
BI( sout, ":/prefsmenu/advanced/sout.svg" );
BI( advanced, ":/prefsmenu/advanced/extended.svg" );
BI( playlist, ":/prefsmenu/advanced/playlist.svg" );
BI( interface, ":/prefsmenu/advanced/intf.svg" );
#undef BI
/* Build the tree for the main module */
......
......@@ -209,7 +209,7 @@ void AbstractController::createAndAddWidget( QBoxLayout *controlLayout_,
a_button->setIcon( QIcon( iconL[button] ) );
#define BUTTON_SET_BAR2( button, image, tooltip ) \
button->setToolTip( tooltip ); \
button->setIcon( QIcon( ":/"#image ) );
button->setIcon( QIcon( ":/"#image ".svg" ) );
#define ENABLE_ON_VIDEO( a ) \
CONNECT( THEMIM->getIM(), voutChanged( bool ), a, setEnabled( bool ) ); \
......
......@@ -126,15 +126,15 @@ static const char* const tooltipL[BUTTON_MAX] = { I_PLAY_TOOLTIP,
N_("Open subtitle file"),
N_("Dock/undock fullscreen controller to/from bottom of screen"),
};
static const QString iconL[BUTTON_MAX] ={ ":/toolbar/play_b", ":/toolbar/stop_b",
":/toolbar/eject", ":/toolbar/previous_b", ":/toolbar/next_b",
":/toolbar/slower", ":/toolbar/faster", ":/toolbar/fullscreen",
":/toolbar/defullscreen", ":/toolbar/extended", ":/toolbar/playlist",
":/toolbar/snapshot", ":/toolbar/record", ":/toolbar/atob_nob",
":/toolbar/frame", ":/toolbar/reverse", ":/toolbar/skip_back",
":/toolbar/skip_fw", ":/toolbar/clear", ":/buttons/playlist/shuffle_on",
":/buttons/playlist/repeat_all", ":/menu/info",
":/toolbar/previous_b", ":/toolbar/next_b", ":/toolbar/eject", ":/toolbar/space"
static const QString iconL[BUTTON_MAX] ={ ":/toolbar/play_b.svg", ":/toolbar/stop_b.svg",
":/toolbar/eject.svg", ":/toolbar/previous_b.svg", ":/toolbar/next_b.svg",
":/toolbar/slower.svg", ":/toolbar/faster.svg", ":/toolbar/fullscreen.svg",
":/toolbar/defullscreen.svg", ":/toolbar/extended.svg", ":/toolbar/playlist.svg",
":/toolbar/snapshot.svg", ":/toolbar/record.svg", ":/toolbar/atob_nob.svg",
":/toolbar/frame.svg", ":/toolbar/reverse.svg", ":/toolbar/skip_back.svg",
":/toolbar/skip_fw.svg", ":/toolbar/clear.svg", ":/buttons/playlist/shuffle_on.svg",
":/buttons/playlist/repeat_all.svg", ":/menu/info.svg",
":/toolbar/previous_b.svg", ":/toolbar/next_b.svg", ":/toolbar/eject.svg", ":/toolbar/space.svg"
};
enum
......
......@@ -53,7 +53,7 @@ SoundWidget::SoundWidget( QWidget *_parent, intf_thread_t * _p_intf,
/* We need a Label for the pix */
volMuteLabel = new QLabel;
volMuteLabel->setPixmap( ImageHelper::loadSvgToPixmap( ":/toolbar/volume-medium", 16, 16 ) );
volMuteLabel->setPixmap( ImageHelper::loadSvgToPixmap( ":/toolbar/volume-medium.svg", 16, 16 ) );
/* We might need a subLayout too */
QVBoxLayout *subLayout;
......@@ -128,7 +128,7 @@ SoundWidget::SoundWidget( QWidget *_parent, intf_thread_t * _p_intf,
void SoundWidget::refreshLabels()
{
int i_sliderVolume = volumeSlider->value();
const char *psz_icon = ":/toolbar/volume-muted";
const char *psz_icon = ":/toolbar/volume-muted.svg";
if( b_is_muted )
{
......@@ -138,11 +138,11 @@ void SoundWidget::refreshLabels()
}
if( i_sliderVolume < VOLUME_MAX / 3 )
psz_icon = ":/toolbar/volume-low";
psz_icon = ":/toolbar/volume-low.svg";
else if( i_sliderVolume > (VOLUME_MAX * 2 / 3 ) )
psz_icon = ":/toolbar/volume-high";
psz_icon = ":/toolbar/volume-high.svg";
else
psz_icon = ":/toolbar/volume-medium";
psz_icon = ":/toolbar/volume-medium.svg";
volMuteLabel->setPixmap( ImageHelper::loadSvgToPixmap( psz_icon, 16, 16 ) );
volMuteLabel->setToolTip( qfu(vlc_pgettext("Tooltip|Mute", "Mute")) );
......@@ -230,7 +230,7 @@ bool SoundWidget::eventFilter( QObject *obj, QEvent *e )
**/
void PlayButton::updateButtonIcons( bool b_playing )
{
setIcon( b_playing ? QIcon( ":/toolbar/pause_b" ) : QIcon( ":/toolbar/play_b" ) );
setIcon( b_playing ? QIcon( ":/toolbar/pause_b.svg" ) : QIcon( ":/toolbar/play_b.svg" ) );
setToolTip( b_playing ? qtr( "Pause the playback" )
: qtr( I_PLAY_TOOLTIP ) );
}
......@@ -239,18 +239,18 @@ void AtoB_Button::updateButtonIcons( bool timeA, bool timeB )
{
if( !timeA && !timeB)
{
setIcon( QIcon( ":/toolbar/atob_nob" ) );
setIcon( QIcon( ":/toolbar/atob_nob.svg" ) );
setToolTip( qtr( "Loop from point A to point B continuously\n"
"Click to set point A" ) );
}
else if( timeA && !timeB )
{
setIcon( QIcon( ":/toolbar/atob_noa" ) );
setIcon( QIcon( ":/toolbar/atob_noa.svg" ) );
setToolTip( qtr( "Click to set point B" ) );
}
else if( timeA && timeB )
{
setIcon( QIcon( ":/toolbar/atob" ) );
setIcon( QIcon( ":/toolbar/atob.svg" ) );
setToolTip( qtr( "Stop the A to B loop" ) );
}
}
......@@ -258,8 +258,8 @@ void AtoB_Button::updateButtonIcons( bool timeA, bool timeB )
void LoopButton::updateButtonIcons( int value )
{
setChecked( value != NORMAL );
setIcon( ( value == REPEAT_ONE ) ? QIcon( ":/buttons/playlist/repeat_one" )
: QIcon( ":/buttons/playlist/repeat_all" ) );
setIcon( ( value == REPEAT_ONE ) ? QIcon( ":/buttons/playlist/repeat_one.svg" )
: QIcon( ":/buttons/playlist/repeat_all.svg" ) );
}
void AspectRatioComboBox::updateRatios()
......
......@@ -84,9 +84,9 @@ void PLSelItem::addAction( ItemAction act, const QString& tooltip )
switch( act )
{
case ADD_ACTION:
icon = QIcon( ":/buttons/playlist/playlist_add" ); break;
icon = QIcon( ":/buttons/playlist/playlist_add.svg" ); break;
case RM_ACTION:
icon = QIcon( ":/buttons/playlist/playlist_remove" ); break;
icon = QIcon( ":/buttons/playlist/playlist_remove.svg" ); break;
default:
return;
}
......@@ -233,7 +233,7 @@ void PLSelector::createItems()
playlistItem = putPLData( addItem( PL_ITEM_TYPE, N_("Playlist"), true ),
THEPL->p_playing );
playlistItem->treeItem()->setData( 0, SPECIAL_ROLE, QVariant( IS_PL ) );
playlistItem->treeItem()->setData( 0, Qt::DecorationRole, QIcon( ":/sidebar/playlist" ) );
playlistItem->treeItem()->setData( 0, Qt::DecorationRole, QIcon( ":/sidebar/playlist.svg" ) );
setCurrentItem( playlistItem->treeItem() );
/* ML */
......@@ -242,7 +242,7 @@ void PLSelector::createItems()
PLSelItem *ml = putPLData( addItem( PL_ITEM_TYPE, N_("Media Library"), true ),
THEPL->p_media_library );
ml->treeItem()->setData( 0, SPECIAL_ROLE, QVariant( IS_ML ) );
ml->treeItem()->setData( 0, Qt::DecorationRole, QIcon( ":/sidebar/library" ) );
ml->treeItem()->setData( 0, Qt::DecorationRole, QIcon( ":/sidebar/library.svg" ) );
}
/* SD nodes */
......@@ -285,16 +285,16 @@ void PLSelector::createItems()
selItem->addAction( ADD_ACTION, qtr( "Subscribe to a podcast" ) );
CONNECT( selItem, action( PLSelItem* ), this, podcastAdd( PLSelItem* ) );
podcastsParent = selItem->treeItem();
icon = QIcon( ":/sidebar/podcast" );
icon = QIcon( ":/sidebar/podcast.svg" );
}
else if ( name.startsWith( "lua{" ) )
{
int i_head = name.indexOf( "sd='" ) + 4;
int i_tail = name.indexOf( '\'', i_head );
QString iconname = QString( ":/sidebar/sd/%1" ).arg( name.mid( i_head, i_tail - i_head ) );
QString iconname = QString( ":/sidebar/sd/%1.svg" ).arg( name.mid( i_head, i_tail - i_head ) );
QResource resource( iconname );
if ( !resource.isValid() )
icon = QIcon( ":/sidebar/network" );
icon = QIcon( ":/sidebar/network.svg" );
else
icon = QIcon( iconname );
}
......@@ -304,29 +304,29 @@ void PLSelector::createItems()
name = name.mid( 0, name.indexOf( '{' ) );
selItem = addItem( SD_TYPE, *ppsz_longname, false, false, devices );
if ( name == "xcb_apps" )
icon = QIcon( ":/sidebar/screen" );
icon = QIcon( ":/sidebar/screen.svg" );
else if ( name == "mtp" )
icon = QIcon( ":/sidebar/mtp" );
icon = QIcon( ":/sidebar/mtp.svg" );
else if ( name == "disc" )
icon = QIcon( ":/sidebar/disc" );
icon = QIcon( ":/sidebar/disc.svg" );
else
icon = QIcon( ":/sidebar/capture" );
icon = QIcon( ":/sidebar/capture.svg" );
break;
case SD_CAT_LAN:
selItem = addItem( SD_TYPE, *ppsz_longname, false, false, lan );
icon = QIcon( ":/sidebar/lan" );
icon = QIcon( ":/sidebar/lan.svg" );
break;
case SD_CAT_MYCOMPUTER:
name = name.mid( 0, name.indexOf( '{' ) );
selItem = addItem( SD_TYPE, *ppsz_longname, false, false, mycomp );
if ( name == "video_dir" )
icon = QIcon( ":/sidebar/movie" );
icon = QIcon( ":/sidebar/movie.svg" );
else if ( name == "audio_dir" )
icon = QIcon( ":/sidebar/music" );
icon = QIcon( ":/sidebar/music.svg" );
else if ( name == "picture_dir" )
icon = QIcon( ":/sidebar/pictures" );
icon = QIcon( ":/sidebar/pictures.svg" );
else
icon = QIcon( ":/sidebar/movie" );
icon = QIcon( ":/sidebar/movie.svg" );
break;
default:
selItem = addItem( SD_TYPE, *ppsz_longname );
......
......@@ -101,10 +101,10 @@ StandardPLPanel::StandardPLPanel( PlaylistWidget *_parent,
lastActivatedPLItemId = -1;
QList<QString> frames;
frames << ":/util/wait1";
frames << ":/util/wait2";
frames << ":/util/wait3";
frames << ":/util/wait4";
frames << ":/util/wait1.svg";
frames << ":/util/wait2.svg";
frames << ":/util/wait3.svg";
frames << ":/util/wait4.svg";
spinnerAnimation = new PixmapAnimator( this, frames, SPINNER_SIZE, SPINNER_SIZE );
CONNECT( spinnerAnimation, pixmapReady( const QPixmap & ), this, updateViewport() );
......@@ -190,27 +190,27 @@ bool StandardPLPanel::popup( const QPoint &point )
/* Play/Stream/Info static actions */
ADD_MENU_ENTRY( QIcon( ":/toolbar/play_b" ), qtr(I_POP_PLAY),
ADD_MENU_ENTRY( QIcon( ":/toolbar/play_b.svg" ), qtr(I_POP_PLAY),
VLCModelSubInterface::ACTION_PLAY )
ADD_MENU_ENTRY( QIcon( ":/toolbar/pause_b" ), qtr("Pause"),
ADD_MENU_ENTRY( QIcon( ":/toolbar/pause_b.svg" ), qtr("Pause"),
VLCModelSubInterface::ACTION_PAUSE )
ADD_MENU_ENTRY( QIcon( ":/menu/stream" ), qtr(I_POP_STREAM),
ADD_MENU_ENTRY( QIcon( ":/menu/stream.svg" ), qtr(I_POP_STREAM),
VLCModelSubInterface::ACTION_STREAM )
ADD_MENU_ENTRY( QIcon(), qtr(I_POP_SAVE),
VLCModelSubInterface::ACTION_SAVE );
ADD_MENU_ENTRY( QIcon( ":/menu/info" ), qtr(I_POP_INFO),
ADD_MENU_ENTRY( QIcon( ":/menu/info.svg" ), qtr(I_POP_INFO),
VLCModelSubInterface::ACTION_INFO );
menu.addSeparator();
ADD_MENU_ENTRY( QIcon( ":/type/folder-grey" ), qtr(I_POP_EXPLORE),
ADD_MENU_ENTRY( QIcon( ":/type/folder-grey.svg" ), qtr(I_POP_EXPLORE),
VLCModelSubInterface::ACTION_EXPLORE );
QIcon addIcon( ":/buttons/playlist/playlist_add" );
QIcon addIcon( ":/buttons/playlist/playlist_add.svg" );
ADD_MENU_ENTRY( addIcon, qtr(I_POP_NEWFOLDER),
VLCModelSubInterface::ACTION_CREATENODE )
......@@ -240,10 +240,10 @@ bool StandardPLPanel::popup( const QPoint &point )
/* Item removal */
ADD_MENU_ENTRY( QIcon( ":/buttons/playlist/playlist_remove" ), qtr(I_POP_DEL),
ADD_MENU_ENTRY( QIcon( ":/buttons/playlist/playlist_remove.svg" ), qtr(I_POP_DEL),
VLCModelSubInterface::ACTION_REMOVE );
ADD_MENU_ENTRY( QIcon( ":/toolbar/clear" ), qtr("Clear the playlist"),
ADD_MENU_ENTRY( QIcon( ":/toolbar/clear.svg" ), qtr("Clear the playlist"),
VLCModelSubInterface::ACTION_CLEAR );
menu.addSeparator();
......@@ -558,7 +558,8 @@ bool StandardPLPanel::eventFilter ( QObject *obj, QEvent * event )
{
QWidget *viewport = qobject_cast<QWidget *>( obj );
QStylePainter painter( viewport );
QPixmap dropzone = ImageHelper::loadSvgToPixmap(":/dropzone", DROPZONE_SIZE, DROPZONE_SIZE);
QPixmap dropzone = ImageHelper::loadSvgToPixmap(":/dropzone.svg", DROPZONE_SIZE, DROPZONE_SIZE);
qreal scale = dropzone.devicePixelRatio();
QRect rect = viewport->geometry();
QSize size = rect.size() / 2 - dropzone.size() / (2 * scale);
......
......@@ -133,7 +133,7 @@ void PlIconViewItemDelegate::paint( QPainter * painter, const QStyleOptionViewIt
painter->fillPath( nodeRectPath, option.palette.color( QPalette::Highlight ) );
painter->setOpacity( 1.0 );
}
QSvgRenderer renderer( QString(":/type/node") );
QSvgRenderer renderer( QString(":/type/node.svg") );
renderer.render(painter, r);
}
......@@ -233,7 +233,7 @@ void PlListViewItemDelegate::paint( QPainter * painter, const QStyleOptionViewIt
if( !index.data( VLCModel::LEAF_NODE_ROLE ).toBool() )
{
qreal pixsize = fm.height();
QSvgRenderer renderer( QString( ":/type/node" ) );
QSvgRenderer renderer( QString( ":/type/node.svg" ) );
renderer.render(painter, QRect(
textRect.x(), textRect.center().y() - pixsize / 2,
pixsize, pixsize ) );
......@@ -296,7 +296,7 @@ void CellPixmapDelegate::paint( QPainter * painter, const QStyleOptionViewItem &
static inline void plViewStartDrag( QAbstractItemView *view, const Qt::DropActions & supportedActions )
{
QDrag *drag = new QDrag( view );
drag->setPixmap( QPixmap( ":/noart64" ) );
drag->setPixmap( QPixmap( ":/noart64.png" ) );
drag->setMimeData( view->model()->mimeData(
view->selectionModel()->selectedIndexes() ) );
drag->exec( supportedActions );
......
......@@ -54,13 +54,13 @@ VLCModel::VLCModel( intf_thread_t *_p_intf, QObject *parent )
/* Icons initialization */
#define ADD_ICON(type, x) icons[ITEM_TYPE_##type] = QIcon( x )
ADD_ICON( UNKNOWN , QPixmap( type_unknown_xpm ) );
ADD_ICON( FILE, ":/type/file" );
ADD_ICON( DIRECTORY, ":/type/directory" );
ADD_ICON( DISC, ":/type/disc" );
ADD_ICON( CARD, ":/type/capture-card" );
ADD_ICON( STREAM, ":/type/stream" );
ADD_ICON( PLAYLIST, ":/type/playlist" );
ADD_ICON( NODE, ":/type/node" );
ADD_ICON( FILE, ":/type/file.svg" );
ADD_ICON( DIRECTORY, ":/type/directory.svg" );
ADD_ICON( DISC, ":/type/disc.svg" );
ADD_ICON( CARD, ":/type/capture-card.svg" );
ADD_ICON( STREAM, ":/type/stream.svg" );
ADD_ICON( PLAYLIST, ":/type/playlist.svg" );
ADD_ICON( NODE, ":/type/node.svg" );
#undef ADD_ICON
}
......
......@@ -175,19 +175,19 @@ void InterfacePreviewWidget::setNormalPreview( bool b_minimal )
void InterfacePreviewWidget::setPreview( enum_style e_style )
{
QString pixmapLocationString(":/prefsmenu/");
QString pixmapLocationString;
switch( e_style )
{
default:
case COMPLETE:
pixmapLocationString += "sample_complete";
pixmapLocationString = ":/prefsmenu/sample_complete.png";
break;
case MINIMAL:
pixmapLocationString += "sample_minimal";
pixmapLocationString = ":/prefsmenu/sample_minimal.png";
break;
case SKINS:
pixmapLocationString += "sample_skins";
pixmapLocationString = ":/prefsmenu/sample_skins.png";
break;
}
......
......@@ -194,7 +194,7 @@ SPrefsCatList::SPrefsCatList( intf_thread_t *_p_intf, QWidget *_parent ) :
#define ADD_CATEGORY( button, label, ltooltip, icon, numb ) \
QToolButton * button = new QToolButton( this ); \
button->setIcon( QIcon( ":/prefsmenu/" #icon ) ); \
button->setIcon( QIcon( ":/prefsmenu/" #icon ".png" ) ); \
button->setText( label ); \
button->setToolTip( ltooltip ); \
button->setToolButtonStyle( Qt::ToolButtonTextUnderIcon ); \
......
......@@ -57,17 +57,17 @@ VLCProfileSelector::VLCProfileSelector( QWidget *_parent ): QWidget( _parent )
layout->addWidget( profileBox );
QToolButton *editButton = new QToolButton( this );
editButton->setIcon( QIcon( ":/menu/preferences" ) );
editButton->setIcon( QIcon( ":/menu/preferences.svg" ) );
editButton->setToolTip( qtr( "Edit selected profile" ) );
layout->addWidget( editButton );
QToolButton *deleteButton = new QToolButton( this );
deleteButton->setIcon( QIcon( ":/toolbar/clear" ) );
deleteButton->setIcon( QIcon( ":/toolbar/clear.svg" ) );
deleteButton->setToolTip( qtr( "Delete selected profile" ) );
layout->addWidget( deleteButton );
QToolButton *newButton = new QToolButton( this );
newButton->setIcon( QIcon( ":/new" ) );
newButton->setIcon( QIcon( ":/new.svg" ) );
newButton->setToolTip( qtr( "Create a new profile" ) );
layout->addWidget(newButton);
......@@ -623,14 +623,14 @@ void VLCProfileEditor::muxSelected()
int textsize = QFontMetrics(ui.muxerwarning->font()).ascent();
if( current->property("module").toString() == "avformat" )
ui.muxerwarning->setText(
QString( "<img src=\":/menu/info\" width=%2 height=%2/> %1" )
QString( "<img src=\":/menu/info.svg\" width=%2 height=%2/> %1" )
.arg( qtr( "This muxer is not provided directly by VLC: It could be missing." ) )
.arg(textsize)
);
else if ( !caps["muxers"].contains( current->property("module").toString() ) &&
!caps["muxers"].contains( "mux_" + current->property("module").toString() ) )
ui.muxerwarning->setText(
QString( "<img src=\":/toobar/clear\" width=%2 height=%2/> %1" )
QString( "<img src=\":/toobar/clear.svg\" width=%2 height=%2/> %1" )
.arg( qtr( "This muxer is missing. Using this profile will fail" ) )
.arg(textsize)
);
......
......@@ -62,7 +62,7 @@ GotoTimeDialog::GotoTimeDialog( intf_thread_t *_p_intf)
timeEdit->setAlignment( Qt::AlignRight );
timeEdit->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Minimum );
QPushButton *resetButton = new QPushButton( QIcon(":/update"), "" );
QPushButton *resetButton = new QPushButton( QIcon(":/update.svg"), "" );
resetButton->setToolTip( qtr("Reset") );
mainLayout->addWidget( timeIntro, 0, 0, 1, 1 );
......
......@@ -98,7 +98,7 @@ MessagesDialog::MessagesDialog( intf_thread_t *_p_intf)
ui.filterEdit->setText( getSettings()->value( "messages-filter" ).toString() );
getSettings()->endGroup();
updateButton = new QPushButton( QIcon(":/update"), "" );
updateButton = new QPushButton( QIcon(":/update.svg"), "" );
updateButton->setFlat( true );
ui.mainTab->setCornerWidget( updateButton );
......@@ -330,7 +330,7 @@ void MessagesDialog::updateOrClear()
void MessagesDialog::tabChanged( int i )
{
updateButton->setIcon( i != 0 ? QIcon(":/update") : QIcon(":/toolbar/clear") );
updateButton->setIcon( i != 0 ? QIcon(":/update.svg") : QIcon(":/toolbar/clear.svg") );
updateButton->setToolTip( i != 0 ? qtr("Update the tree")
: qtr("Clear the messages") );
}
......
......@@ -86,14 +86,14 @@ OpenDialog::OpenDialog( QWidget *parent,
captureOpenPanel = new CaptureOpenPanel( this, p_intf );
/* Insert the tabs */
ui.Tab->insertTab( OPEN_FILE_TAB, fileOpenPanel, QIcon( ":/type/file-asym" ),
ui.Tab->insertTab( OPEN_FILE_TAB, fileOpenPanel, QIcon( ":/type/file-asym.svg" ),
qtr( "&File" ) );
ui.Tab->insertTab( OPEN_DISC_TAB, discOpenPanel, QIcon( ":/type/disc" ),
ui.Tab->insertTab( OPEN_DISC_TAB, discOpenPanel, QIcon( ":/type/disc.svg" ),
qtr( "&Disc" ) );
ui.Tab->insertTab( OPEN_NETWORK_TAB, netOpenPanel, QIcon( ":/type/network" ),
ui.Tab->insertTab( OPEN_NETWORK_TAB, netOpenPanel, QIcon( ":/type/network.svg" ),
qtr( "&Network" ) );
ui.Tab->insertTab( OPEN_CAPTURE_TAB, captureOpenPanel,
QIcon( ":/type/capture-card" ), qtr( "Capture &Device" ) );
QIcon( ":/type/capture-card.svg" ), qtr( "Capture &Device" ) );
/* Hide the Slave input widgets */
ui.slaveLabel->hide();
......
......@@ -251,7 +251,7 @@ ExtensionTab::ExtensionTab( intf_thread_t *p_intf_ )
QDialogButtonBox *buttonsBox = new QDialogButtonBox;
// More information button
butMoreInfo = new QPushButton( QIcon( ":/menu/info" ),
butMoreInfo = new QPushButton( QIcon( ":/menu/info.svg" ),
qtr( "More information..." ),
this );
CONNECT( butMoreInfo, clicked(), this, moreInformation() );
......@@ -259,7 +259,7 @@ ExtensionTab::ExtensionTab( intf_thread_t *p_intf_ )
// Reload button
ExtensionsManager *EM = ExtensionsManager::getInstance( p_intf );
QPushButton *reload = new QPushButton( QIcon( ":/update" ),
QPushButton *reload = new QPushButton( QIcon( ":/update.svg" ),
qtr( "Reload extensions" ),
this );
CONNECT( reload, clicked(), EM, reloadExtensions() );
......@@ -310,19 +310,19 @@ static QIcon iconFromCategory( int type )
switch( type )
{
case ADDON_EXTENSION:
return QIcon( ":/addons/addon_yellow" );
return QIcon( ":/addons/addon_yellow.svg" );
case ADDON_PLAYLIST_PARSER:
return QIcon( ":/addons/addon_green" );
return QIcon( ":/addons/addon_green.svg" );
case ADDON_SERVICE_DISCOVERY:
return QIcon( ":/addons/addon_red" );
return QIcon( ":/addons/addon_red.svg" );
case ADDON_SKIN2:
return QIcon( ":/addons/addon_cyan" );
return QIcon( ":/addons/addon_cyan.svg" );
case ADDON_INTERFACE:
return QIcon( ":/addons/addon_blue" );
return QIcon( ":/addons/addon_blue.svg" );
case ADDON_META:
return QIcon( ":/addons/addon_magenta" );
return QIcon( ":/addons/addon_magenta.svg" );
default:
return QIcon( ":/addons/default" );
return QIcon( ":/addons/default.svg" );
}
vlc_assert_unreachable();
}
......@@ -423,7 +423,7 @@ AddonsTab::AddonsTab( intf_thread_t *p_intf_ ) : QVLCFrame( p_intf_ )
switchStack->insertWidget( WITHONLINEADDONS, installedOnlyBox );
CONNECT( installedOnlyBox, stateChanged(int), this, installChecked(int) );
QPushButton *reposyncButton = new QPushButton( QIcon( ":/update" ),
QPushButton *reposyncButton = new QPushButton( QIcon( ":/update.svg" ),
qtr("Find more addons online") );
reposyncButton->setSizePolicy( QSizePolicy::Ignored, QSizePolicy::Preferred );
switchStack->insertWidget( ONLYLOCALADDONS, reposyncButton );
......@@ -481,10 +481,10 @@ AddonsTab::AddonsTab( intf_thread_t *p_intf_ ) : QVLCFrame( p_intf_ )
model, addonChanged( const addon_entry_t * ) );
QList<QString> frames;
frames << ":/util/wait1";
frames << ":/util/wait2";
frames << ":/util/wait3";
frames << ":/util/wait4";
frames << ":/util/wait1.svg";
frames << ":/util/wait2.svg";
frames << ":/util/wait3.svg";
frames << ":/util/wait4.svg";
spinnerAnimation = new PixmapAnimator( this, frames, SPINNER_SIZE, SPINNER_SIZE );
CONNECT( spinnerAnimation, pixmapReady( const QPixmap & ),
addonsView->viewport(), update() );
......@@ -806,9 +806,9 @@ QVariant AddonsListModel::Addon::data( int role ) const
returnval = pixmap;
}
else if ( p_entry->e_flags & ADDON_BROKEN )
returnval = QPixmap( ":/addons/broken" );
returnval = QPixmap( ":/addons/broken.svg" );
else
returnval = QPixmap( ":/addons/default" );
returnval = QPixmap( ":/addons/default.svg" );
break;
case Qt::ToolTipRole:
{
......@@ -1216,7 +1216,7 @@ void AddonItemDelegate::paint( QPainter *painter,
{
int i_scoreicon_height = newopt.fontMetrics.height();
int i_scoreicon_width = i_scoreicon_height * SCORE_ICON_WIDTH_SCALE;
scoreicon = ImageHelper::loadSvgToPixmap( ":/addons/score",
scoreicon = ImageHelper::loadSvgToPixmap( ":/addons/score.svg",
i_scoreicon_width, i_scoreicon_height );
int i_width = ( (float) i_score / ADDON_MAX_SCORE ) * i_scoreicon_width;
/* Erase the end (value) of our pixmap with a shadow */
......@@ -1298,7 +1298,7 @@ QWidget *AddonItemDelegate::createEditor( QWidget *parent,
editorWidget->setLayout( new QHBoxLayout() );
editorWidget->layout()->setMargin( 0 );
infoButton = new QPushButton( QIcon( ":/menu/info" ),
infoButton = new QPushButton( QIcon( ":/menu/info.svg" ),
qtr( "More information..." ) );
connect( infoButton, SIGNAL(clicked()), this, SIGNAL(showInfo()) );
editorWidget->layout()->addWidget( infoButton );
......@@ -1307,10 +1307,10 @@ QWidget *AddonItemDelegate::createEditor( QWidget *parent,
index.data( AddonsListModel::FlagsRole ).toInt() )
{
if ( index.data( AddonsListModel::StateRole ).toInt() == ADDON_INSTALLED )
installButton = new QPushButton( QIcon( ":/buttons/playlist/playlist_remove" ),
installButton = new QPushButton( QIcon( ":/buttons/playlist/playlist_remove.svg" ),
qtr("&Uninstall"), parent );
else
installButton = new QPushButton( QIcon( ":/buttons/playlist/playlist_add" ),
installButton = new QPushButton( QIcon( ":/buttons/playlist/playlist_add.svg" ),
qtr("&Install"), parent );
CONNECT( installButton, clicked(), this, editButtonClicked() );
editorWidget->layout()->addWidget( installButton );
......
......@@ -64,7 +64,7 @@ SoutDialog::SoutDialog( QWidget *parent, intf_thread_t *_p_intf, const QString&
QTabBar* tb = ui.destTab->findChild<QTabBar*>();
if( tb != NULL ) tb->tabButton(0, QTabBar::RightSide)->hide();
CONNECT( ui.destTab, tabCloseRequested( int ), this, closeTab( int ) );
ui.destTab->setTabIcon( 0, QIcon( ":/buttons/playlist/playlist_add" ) );
ui.destTab->setTabIcon( 0, QIcon( ":/buttons/playlist/playlist_add.svg" ) );
ui.destBox->addItem( qtr( "File" ) );
ui.destBox->addItem( "HTTP" );
......
......@@ -143,10 +143,10 @@ ToolbarEditDialog::ToolbarEditDialog( QWidget *_w, intf_thread_t *_p_intf)
profileCombo = new QComboBox;
QToolButton *newButton = new QToolButton;
newButton->setIcon( QIcon( ":/new" ) );
newButton->setIcon( QIcon( ":/new.svg" ) );
newButton->setToolTip( qtr("New profile") );
QToolButton *deleteButton = new QToolButton;
deleteButton->setIcon( QIcon( ":/toolbar/clear" ) );
deleteButton->setIcon( QIcon( ":/toolbar/clear.svg" ) );
deleteButton->setToolTip( qtr( "Delete the current profile" ) );
profileBoxLayout->addWidget( new QLabel( qtr( "Select profile:" ) ), 0, 0 );
......@@ -413,14 +413,14 @@ WidgetListing::WidgetListing( intf_thread_t *p_intf, QWidget *_parent )
}
/* Spacers are yet again a different thing */
QListWidgetItem *widgetItem = new QListWidgetItem( QIcon( ":/toolbar/space" ),
QListWidgetItem *widgetItem = new QListWidgetItem( QIcon( ":/toolbar/space.svg" ),
qtr( "Spacer" ), this );
widgetItem->setData( Qt::UserRole, WIDGET_SPACER );
widgetItem->setToolTip( widgetItem->text() );
widgetItem->setSizeHint( QSize( widgetItem->sizeHint().width(), 32 ) );
addItem( widgetItem );
widgetItem = new QListWidgetItem( QIcon( ":/toolbar/space" ),
widgetItem = new QListWidgetItem( QIcon( ":/toolbar/space.svg" ),
qtr( "Expanding Spacer" ), this );
widgetItem->setData( Qt::UserRole, WIDGET_SPACER_EXTEND );
widgetItem->setToolTip( widgetItem->text() );
......@@ -474,7 +474,7 @@ WidgetListing::WidgetListing( intf_thread_t *p_intf, QWidget *_parent )
{
QListWidgetItem *widgetItem = new QListWidgetItem( this );
widgetItem->setText( qtr("Small Volume") );
widgetItem->setIcon( QIcon( ":/toolbar/volume-medium" ) );
widgetItem->setIcon( QIcon( ":/toolbar/volume-medium.svg" ) );
widgetItem->setData( Qt::UserRole, QVariant( i ) );
addItem( widgetItem );
}
......@@ -494,17 +494,17 @@ WidgetListing::WidgetListing( intf_thread_t *p_intf, QWidget *_parent )
discLayout->setSpacing( 0 ); discLayout->setMargin( 0 );
QToolButton *prevSectionButton = new QToolButton( discFrame );
prevSectionButton->setIcon( QIcon( ":/toolbar/dvd_prev" ) );
prevSectionButton->setIcon( QIcon( ":/toolbar/dvd_prev.svg" ) );
prevSectionButton->setToolTip( qtr("Previous chapter") );
discLayout->addWidget( prevSectionButton );
QToolButton *menuButton = new QToolButton( discFrame );
menuButton->setIcon( QIcon( ":/toolbar/dvd_menu" ) );
menuButton->setIcon( QIcon( ":/toolbar/dvd_menu.svg" ) );
menuButton->setToolTip( qtr("Go to the DVD menu") );
discLayout->addWidget( menuButton );
QToolButton *nextButton = new QToolButton( discFrame );
nextButton->setIcon( QIcon( ":/toolbar/dvd_next" ) );
nextButton->setIcon( QIcon( ":/toolbar/dvd_next.svg" ) );
nextButton->setToolTip( qtr("Next chapter") );
discLayout->addWidget( nextButton );
......@@ -519,11 +519,11 @@ WidgetListing::WidgetListing( intf_thread_t *p_intf, QWidget *_parent )
telexLayout->setSpacing( 0 ); telexLayout->setMargin( 0 );
QToolButton *telexOn = new QToolButton( telexFrame );
telexOn->setIcon( QIcon( ":/toolbar/tv" ) );
telexOn->setIcon( QIcon( ":/toolbar/tv.svg" ) );
telexLayout->addWidget( telexOn );
QToolButton *telexTransparent = new QToolButton;
telexTransparent->setIcon( QIcon( ":/toolbar/tvtelx" ) );
telexTransparent->setIcon( QIcon( ":/toolbar/tvtelx.svg" ) );
telexTransparent->setToolTip( qtr("Teletext transparency") );
telexLayout->addWidget( telexTransparent );
......@@ -669,7 +669,7 @@ void DroppingController::createAndAddWidget( QBoxLayout *newControlLayout,
if( i_type == WIDGET_SPACER || i_type == WIDGET_SPACER_EXTEND )
{
QLabel *label = new QLabel( this );
label->setPixmap( ImageHelper::loadSvgToPixmap( ":/toolbar/space", height(), height() ) );
label->setPixmap( ImageHelper::loadSvgToPixmap( ":/toolbar/space.svg", height(), height() ) );
if( i_type == WIDGET_SPACER_EXTEND )
{
label->setSizePolicy( QSizePolicy::MinimumExpanding,
......
......@@ -489,12 +489,12 @@ VLMAWidget::VLMAWidget( VLMWrapper *_vlm, const QString& _name,
objLayout->addWidget( time, 1, 3, 1, 2 );*/
QToolButton *modifyButton = new QToolButton;
modifyButton->setIcon( QIcon( ":/menu/settings" ) );
modifyButton->setIcon( QIcon( ":/menu/settings.svg" ) );
modifyButton->setToolTip( qtr("Change") );
objLayout->addWidget( modifyButton, 0, 5 );
QToolButton *deleteButton = new QToolButton;
deleteButton->setIcon( QIcon( ":/pixmaps/clear" ) );
deleteButton->setIcon( QIcon( ":/toolbar/clear.svg" ) );
deleteButton->setToolTip("Delete");
objLayout->addWidget( deleteButton, 0, 6 );
......@@ -535,13 +535,13 @@ VLMBroadcast::VLMBroadcast( VLMWrapper *vlm, const QString& _name,