Commit 8d266a98 authored by Ilkka Ollakka's avatar Ilkka Ollakka

qt4: change QIcon( QPixmap( x ) ) -> QIcon( x )

Seemed to work just fine, and didn't find any reason to keep that form.
parent b664fd63
...@@ -61,7 +61,7 @@ PrefsTree::PrefsTree( intf_thread_t *_p_intf, QWidget *_parent ) : ...@@ -61,7 +61,7 @@ PrefsTree::PrefsTree( intf_thread_t *_p_intf, QWidget *_parent ) :
setTextElideMode( Qt::ElideNone ); setTextElideMode( Qt::ElideNone );
/* Nice icons */ /* Nice icons */
#define BI( a,b) QIcon a##_icon = QIcon( QPixmap( b )) #define BI( a,b) QIcon a##_icon = QIcon( b )
BI( audio, ":/prefsmenu/advanced/audio" ); BI( audio, ":/prefsmenu/advanced/audio" );
BI( video, ":/prefsmenu/advanced/video" ); BI( video, ":/prefsmenu/advanced/video" );
BI( input, ":/prefsmenu/advanced/codec" ); BI( input, ":/prefsmenu/advanced/codec" );
......
...@@ -77,7 +77,7 @@ PLModel::PLModel( playlist_t *_p_playlist, /* THEPL */ ...@@ -77,7 +77,7 @@ PLModel::PLModel( playlist_t *_p_playlist, /* THEPL */
rootItem = NULL; /* PLItem rootItem, will be set in rebuild( ) */ rootItem = NULL; /* PLItem rootItem, will be set in rebuild( ) */
/* Icons initialization */ /* Icons initialization */
#define ADD_ICON(type, x) icons[ITEM_TYPE_##type] = QIcon( QPixmap( x ) ) #define ADD_ICON(type, x) icons[ITEM_TYPE_##type] = QIcon( x )
ADD_ICON( UNKNOWN , type_unknown_xpm ); ADD_ICON( UNKNOWN , type_unknown_xpm );
ADD_ICON( FILE, ":/type/file" ); ADD_ICON( FILE, ":/type/file" );
ADD_ICON( DIRECTORY, ":/type/directory" ); ADD_ICON( DIRECTORY, ":/type/directory" );
......
...@@ -496,11 +496,11 @@ VLMAWidget::VLMAWidget( const QString& _name, ...@@ -496,11 +496,11 @@ VLMAWidget::VLMAWidget( const QString& _name,
objLayout->addWidget( time, 1, 3, 1, 2 );*/ objLayout->addWidget( time, 1, 3, 1, 2 );*/
QToolButton *modifyButton = new QToolButton; QToolButton *modifyButton = new QToolButton;
modifyButton->setIcon( QIcon( QPixmap( ":/menu/settings" ) ) ); modifyButton->setIcon( QIcon( ":/menu/settings" ) );
objLayout->addWidget( modifyButton, 0, 5 ); objLayout->addWidget( modifyButton, 0, 5 );
QToolButton *deleteButton = new QToolButton; QToolButton *deleteButton = new QToolButton;
deleteButton->setIcon( QIcon( QPixmap( ":/menu/quit" ) ) ); deleteButton->setIcon( QIcon( ":/menu/quit" ) );
objLayout->addWidget( deleteButton, 0, 6 ); objLayout->addWidget( deleteButton, 0, 6 );
BUTTONACT( modifyButton, modify() ); BUTTONACT( modifyButton, modify() );
...@@ -537,12 +537,12 @@ VLMBroadcast::VLMBroadcast( const QString& _name, const QString& _input, ...@@ -537,12 +537,12 @@ VLMBroadcast::VLMBroadcast( const QString& _name, const QString& _input,
b_looped = _looped; b_looped = _looped;
playButton = new QToolButton; playButton = new QToolButton;
playButton->setIcon( QIcon( QPixmap( ":/menu/play" ) ) ); playButton->setIcon( QIcon( ":/menu/play" ) );
objLayout->addWidget( playButton, 1, 0 ); objLayout->addWidget( playButton, 1, 0 );
b_playing = true; b_playing = true;
QToolButton *stopButton = new QToolButton; QToolButton *stopButton = new QToolButton;
stopButton->setIcon( QIcon( QPixmap( ":/toolbar/stop_b" ) ) ); stopButton->setIcon( QIcon( ":/toolbar/stop_b" ) );
objLayout->addWidget( stopButton, 1, 1 ); objLayout->addWidget( stopButton, 1, 1 );
loopButton = new QToolButton; loopButton = new QToolButton;
...@@ -559,9 +559,9 @@ void VLMBroadcast::update() ...@@ -559,9 +559,9 @@ void VLMBroadcast::update()
{ {
VLMWrapper::EditBroadcast( name, input, output, b_enabled, b_looped ); VLMWrapper::EditBroadcast( name, input, output, b_enabled, b_looped );
if( b_looped ) if( b_looped )
loopButton->setIcon( QIcon( QPixmap( ":/buttons/playlist/repeat_all" ) ) ); loopButton->setIcon( QIcon( ":/buttons/playlist/repeat_all" ) );
else else
loopButton->setIcon( QIcon( QPixmap( ":/buttons/playlist/repeat_off" ) ) ); loopButton->setIcon( QIcon( ":/buttons/playlist/repeat_off" ) );
} }
void VLMBroadcast::togglePlayPause() void VLMBroadcast::togglePlayPause()
...@@ -569,12 +569,12 @@ void VLMBroadcast::togglePlayPause() ...@@ -569,12 +569,12 @@ void VLMBroadcast::togglePlayPause()
if( b_playing ) if( b_playing )
{ {
VLMWrapper::ControlBroadcast( name, ControlBroadcastPause ); VLMWrapper::ControlBroadcast( name, ControlBroadcastPause );
playButton->setIcon( QIcon( QPixmap( ":/menu/pause" ) ) ); playButton->setIcon( QIcon( ":/menu/pause" ) );
} }
else else
{ {
VLMWrapper::ControlBroadcast( name, ControlBroadcastPlay ); VLMWrapper::ControlBroadcast( name, ControlBroadcastPlay );
playButton->setIcon( QIcon( QPixmap( ":/menu/play" ) ) ); playButton->setIcon( QIcon( ":/menu/play" ) );
} }
b_playing = !b_playing; b_playing = !b_playing;
} }
...@@ -588,7 +588,7 @@ void VLMBroadcast::toggleLoop() ...@@ -588,7 +588,7 @@ void VLMBroadcast::toggleLoop()
void VLMBroadcast::stop() void VLMBroadcast::stop()
{ {
VLMWrapper::ControlBroadcast( name, ControlBroadcastStop ); VLMWrapper::ControlBroadcast( name, ControlBroadcastStop );
playButton->setIcon( QIcon( QPixmap( ":/menu/play" ) ) ); playButton->setIcon( QIcon( ":/menu/play" ) );
} }
/**************** /****************
......
...@@ -1111,9 +1111,9 @@ void MainInterface::createSystray() ...@@ -1111,9 +1111,9 @@ void MainInterface::createSystray()
{ {
QIcon iconVLC; QIcon iconVLC;
if( QDate::currentDate().dayOfYear() >= 354 ) if( QDate::currentDate().dayOfYear() >= 354 )
iconVLC = QIcon( QPixmap( ":/logo/vlc128-christmas.png" ) ); iconVLC = QIcon( ":/logo/vlc128-christmas.png" );
else else
iconVLC = QIcon( QPixmap( ":/logo/vlc128.png" ) ); iconVLC = QIcon( ":/logo/vlc128.png" );
sysTray = new QSystemTrayIcon( iconVLC, this ); sysTray = new QSystemTrayIcon( iconVLC, this );
sysTray->setToolTip( qtr( "VLC media player" )); sysTray->setToolTip( qtr( "VLC media player" ));
......
...@@ -381,9 +381,9 @@ static void *Thread( void *obj ) ...@@ -381,9 +381,9 @@ static void *Thread( void *obj )
/* Icon setting */ /* Icon setting */
if( QDate::currentDate().dayOfYear() >= 352 ) /* One Week before Xmas */ if( QDate::currentDate().dayOfYear() >= 352 ) /* One Week before Xmas */
app.setWindowIcon( QIcon( QPixmap(vlc_christmas_xpm) ) ); app.setWindowIcon( QIcon(vlc_christmas_xpm) );
else else
app.setWindowIcon( QIcon( QPixmap(vlc_xpm) ) ); app.setWindowIcon( QIcon(vlc_xpm) );
/* Initialize timers and the Dialog Provider */ /* Initialize timers and the Dialog Provider */
DialogsProvider::getInstance( p_intf ); DialogsProvider::getInstance( p_intf );
......
Markdown is supported
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