From 94c64e32f2e8d2b36272b41aa64c5c5fcebf067a Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Kempf Date: Wed, 14 Jan 2009 00:00:22 +0100 Subject: [PATCH] Qt: kill many warnings. --- .../qt4/components/complete_preferences.cpp | 6 ++--- modules/gui/qt4/components/controller.cpp | 6 +++++ .../gui/qt4/components/extended_panels.cpp | 2 -- .../gui/qt4/components/extended_panels.hpp | 2 +- .../gui/qt4/components/interface_widgets.cpp | 5 +++- .../gui/qt4/components/interface_widgets.hpp | 3 +++ modules/gui/qt4/components/open_panels.cpp | 2 +- .../gui/qt4/components/playlist/playlist.cpp | 3 ++- .../gui/qt4/components/playlist/playlist.hpp | 3 ++- .../qt4/components/playlist/playlist_item.cpp | 3 --- .../components/playlist/playlist_model.cpp | 2 +- .../gui/qt4/components/playlist/selector.cpp | 3 +-- .../gui/qt4/components/playlist/selector.hpp | 2 +- .../qt4/components/preferences_widgets.cpp | 27 ++++++++++--------- .../qt4/components/preferences_widgets.hpp | 13 ++++----- .../gui/qt4/components/simple_preferences.cpp | 3 +-- modules/gui/qt4/dialogs/bookmarks.cpp | 2 +- modules/gui/qt4/dialogs/messages.cpp | 2 +- modules/gui/qt4/dialogs/open.cpp | 2 +- modules/gui/qt4/dialogs/sout.cpp | 2 +- modules/gui/qt4/dialogs/toolbar.cpp | 6 ++++- modules/gui/qt4/dialogs/vlm.cpp | 2 ++ modules/gui/qt4/dialogs_provider.cpp | 3 +-- modules/gui/qt4/main_interface.cpp | 5 ++++ modules/gui/qt4/menus.cpp | 16 +++++------ modules/gui/qt4/menus.hpp | 7 +++-- modules/gui/qt4/qt4.cpp | 2 -- modules/gui/qt4/util/input_slider.cpp | 2 ++ 28 files changed, 78 insertions(+), 58 deletions(-) diff --git a/modules/gui/qt4/components/complete_preferences.cpp b/modules/gui/qt4/components/complete_preferences.cpp index b34a14ef0d..9120ff69d4 100644 --- a/modules/gui/qt4/components/complete_preferences.cpp +++ b/modules/gui/qt4/components/complete_preferences.cpp @@ -370,11 +370,11 @@ AdvPrefsPanel::AdvPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent, { while (p_item < p_end) { - if( p_item->i_type == CONFIG_SUBCATEGORY && - ( data->i_type == TYPE_SUBCATEGORY && + if( p_item->i_type == CONFIG_SUBCATEGORY && + ( ( data->i_type == TYPE_SUBCATEGORY && p_item->value.i == data->i_object_id ) || ( data->i_type == TYPE_CATSUBCAT && - p_item->value.i == data->i_subcat_id ) ) + p_item->value.i == data->i_subcat_id ) ) ) break; p_item++; } diff --git a/modules/gui/qt4/components/controller.cpp b/modules/gui/qt4/components/controller.cpp index 25d5ee638e..a78510e8fd 100644 --- a/modules/gui/qt4/components/controller.cpp +++ b/modules/gui/qt4/components/controller.cpp @@ -988,6 +988,7 @@ void FullscreenControllerWidget::customEvent( QEvent *event ) b_fs = b_fullscreen; vlc_mutex_unlock( &lock ); if( b_fs ) + { #ifdef WIN32TRICK if( b_fscHidden ) #else @@ -999,6 +1000,7 @@ void FullscreenControllerWidget::customEvent( QEvent *event ) } else hideFSC(); + } break; case FullscreenControlShow_Type: vlc_mutex_lock( &lock ); @@ -1019,6 +1021,8 @@ void FullscreenControllerWidget::customEvent( QEvent *event ) if( !b_mouse_over ) // Only if the mouse is not over FSC planHideFSC(); break; + default: + break; } } @@ -1061,6 +1065,7 @@ void FullscreenControllerWidget::enterEvent( QEvent *event ) #if HAVE_TRANSPARENCY p_slowHideTimer->stop(); #endif + event->accept(); } /** @@ -1071,6 +1076,7 @@ void FullscreenControllerWidget::leaveEvent( QEvent *event ) planHideFSC(); b_mouse_over = false; + event->accept(); } /** diff --git a/modules/gui/qt4/components/extended_panels.cpp b/modules/gui/qt4/components/extended_panels.cpp index 1d6bc24ae9..e85b948d76 100644 --- a/modules/gui/qt4/components/extended_panels.cpp +++ b/modules/gui/qt4/components/extended_panels.cpp @@ -453,7 +453,6 @@ void ExtVideo::setWidgetValue( QObject *widget ) if( i_type == VLC_VAR_INTEGER || i_type == VLC_VAR_BOOL ) { - int i_int = 0; if( slider ) slider->setValue( val.i_int ); else if( checkbox ) checkbox->setCheckState( val.i_int? Qt::Checked : Qt::Unchecked ); @@ -471,7 +470,6 @@ void ExtVideo::setWidgetValue( QObject *widget ) } else if( i_type == VLC_VAR_FLOAT ) { - double f_float = 0; if( slider ) slider->setValue( ( int )( val.f_float*( double )slider->tickInterval() ) ); /* hack alert! */ else if( doublespinbox ) doublespinbox->setValue( val.f_float ); else msg_Warn( p_intf, "Oops %s %s %d", __FILE__, __func__, __LINE__ ); diff --git a/modules/gui/qt4/components/extended_panels.hpp b/modules/gui/qt4/components/extended_panels.hpp index 03ee21aac6..8951ab66c5 100644 --- a/modules/gui/qt4/components/extended_panels.hpp +++ b/modules/gui/qt4/components/extended_panels.hpp @@ -31,11 +31,11 @@ #include #include -#include "../../audio_filter/equalizer_presets.h" #include "ui/equalizer.h" #include "ui/video_effects.h" #include "ui/v4l2.h" +#include "../../audio_filter/equalizer_presets.h" #include diff --git a/modules/gui/qt4/components/interface_widgets.cpp b/modules/gui/qt4/components/interface_widgets.cpp index 2e2f278d96..365c879b6e 100644 --- a/modules/gui/qt4/components/interface_widgets.cpp +++ b/modules/gui/qt4/components/interface_widgets.cpp @@ -112,7 +112,7 @@ void *VideoWidget::request( vout_thread_t *p_nvout, int *pi_x, int *pi_y, } p_vout = p_nvout; #ifndef NDEBUG - msg_Dbg( p_intf, "embedded video ready (handle %p)", winId() ); + msg_Dbg( p_intf, "embedded video ready (handle %p)", (void *)winId() ); #endif return ( void* )winId(); } @@ -215,6 +215,7 @@ void BackgroundWidget::updateArt( QString url ) void BackgroundWidget::contextMenuEvent( QContextMenuEvent *event ) { QVLCMenu::PopupMenu( p_intf, true ); + event->accept(); } #if 0 @@ -462,6 +463,8 @@ TimeLabel::TimeLabel( intf_thread_t *_p_intf ) :QLabel(), p_intf( _p_intf ) void TimeLabel::setDisplayPosition( float pos, int time, int length ) { + VLC_UNUSED( pos ); + char psz_length[MSTRTIME_MAX_SIZE], psz_time[MSTRTIME_MAX_SIZE]; secstotimestr( psz_length, length ); secstotimestr( psz_time, ( b_remainingTime && length ) ? length - time diff --git a/modules/gui/qt4/components/interface_widgets.hpp b/modules/gui/qt4/components/interface_widgets.hpp index 269f79a9a7..a42941030d 100644 --- a/modules/gui/qt4/components/interface_widgets.hpp +++ b/modules/gui/qt4/components/interface_widgets.hpp @@ -133,9 +133,11 @@ protected: virtual void mousePressEvent( QMouseEvent *event ) { toggleTimeDisplay(); + event->accept(); } virtual void mouseDoubleClickEvent( QMouseEvent *event ) { + event->accept(); toggleTimeDisplay(); emit timeLabelDoubleClicked(); } @@ -159,6 +161,7 @@ public: protected: virtual void mouseDoubleClickEvent ( QMouseEvent * event ) { + event->accept(); THEMIM->getIM()->setRate( INPUT_RATE_DEFAULT ); } private slots: diff --git a/modules/gui/qt4/components/open_panels.cpp b/modules/gui/qt4/components/open_panels.cpp index f62c1683d0..a183712c60 100644 --- a/modules/gui/qt4/components/open_panels.cpp +++ b/modules/gui/qt4/components/open_panels.cpp @@ -1188,7 +1188,7 @@ void CaptureOpenPanel::advancedDialog() scroll->setWidget( advFrame ); /* Create the options inside the FrameLayout */ - for( int n = 0; n < i_confsize; n++ ) + for( int n = 0; n < (int)i_confsize; n++ ) { module_config_t *p_item = p_config + n; ConfigControl *config = ConfigControl::createControl( diff --git a/modules/gui/qt4/components/playlist/playlist.cpp b/modules/gui/qt4/components/playlist/playlist.cpp index 293f30ca18..3a610dbba7 100644 --- a/modules/gui/qt4/components/playlist/playlist.cpp +++ b/modules/gui/qt4/components/playlist/playlist.cpp @@ -52,7 +52,7 @@ PlaylistWidget::PlaylistWidget( intf_thread_t *_p_i ) : p_intf ( _p_i ) QSplitter *leftW = new QSplitter( Qt::Vertical, this ); /* Source Selector */ - selector = new PLSelector( this, p_intf, THEPL ); + selector = new PLSelector( this, p_intf ); leftW->addWidget( selector ); /* Create a Container for the Art Label @@ -156,4 +156,5 @@ void PlaylistWidget::closeEvent( QCloseEvent *event ) if( p_intf->p_sys->p_mi ) p_intf->p_sys->p_mi->togglePlaylist(); } + event->accept(); } diff --git a/modules/gui/qt4/components/playlist/playlist.hpp b/modules/gui/qt4/components/playlist/playlist.hpp index b3f59b22ae..ee3dad65dd 100644 --- a/modules/gui/qt4/components/playlist/playlist.hpp +++ b/modules/gui/qt4/components/playlist/playlist.hpp @@ -71,9 +71,10 @@ class ArtLabel : public CoverArtLabel public: ArtLabel( QWidget *parent, intf_thread_t *intf ) : CoverArtLabel( parent, intf ) {}; - void mouseDoubleClickEvent( QMouseEvent *event ) + virtual void mouseDoubleClickEvent( QMouseEvent *event ) { THEDP->mediaInfoDialog(); + event->accept(); } }; diff --git a/modules/gui/qt4/components/playlist/playlist_item.cpp b/modules/gui/qt4/components/playlist/playlist_item.cpp index 71f3fd04bd..0edde6a5f9 100644 --- a/modules/gui/qt4/components/playlist/playlist_item.cpp +++ b/modules/gui/qt4/components/playlist/playlist_item.cpp @@ -169,9 +169,6 @@ int PLItem::row() const */ void PLItem::update( playlist_item_t *p_item, bool iscurrent ) { - char psz_duration[MSTRTIME_MAX_SIZE]; - char *psz_meta; - assert( p_item->p_input->i_id == i_input_id ); /* Useful for the model */ diff --git a/modules/gui/qt4/components/playlist/playlist_model.cpp b/modules/gui/qt4/components/playlist/playlist_model.cpp index 7caa13b519..3cb6fe451d 100644 --- a/modules/gui/qt4/components/playlist/playlist_model.cpp +++ b/modules/gui/qt4/components/playlist/playlist_model.cpp @@ -612,7 +612,7 @@ void PLModel::rebuild( playlist_item_t *p_root ) assert( rootItem ); /* Recreate from root */ UpdateNodeChildren( rootItem ); - if( p_item=playlist_CurrentPlayingItem(p_playlist) ) + if( (p_item = playlist_CurrentPlayingItem(p_playlist)) ) { PLItem *currentItem = FindByInput( rootItem, p_item->p_input->i_id ); diff --git a/modules/gui/qt4/components/playlist/selector.cpp b/modules/gui/qt4/components/playlist/selector.cpp index e4b1c82690..22cad94f6b 100644 --- a/modules/gui/qt4/components/playlist/selector.cpp +++ b/modules/gui/qt4/components/playlist/selector.cpp @@ -32,8 +32,7 @@ #include #include -PLSelector::PLSelector( QWidget *p, intf_thread_t *_p_intf, - playlist_t *p_playlist ) : QWidget( p ), p_intf(_p_intf) +PLSelector::PLSelector( QWidget *p, intf_thread_t *_p_intf ) : QWidget( p ), p_intf(_p_intf) { model = new PLModel( THEPL, p_intf, THEPL->p_root_category, 1, this ); view = new QTreeView( 0 ); diff --git a/modules/gui/qt4/components/playlist/selector.hpp b/modules/gui/qt4/components/playlist/selector.hpp index 7f87233d98..63a514e51a 100644 --- a/modules/gui/qt4/components/playlist/selector.hpp +++ b/modules/gui/qt4/components/playlist/selector.hpp @@ -39,7 +39,7 @@ class PLSelector: public QWidget { Q_OBJECT; public: - PLSelector( QWidget *p, intf_thread_t *_p_intf, playlist_t * ); + PLSelector( QWidget *p, intf_thread_t *_p_intf ); virtual ~PLSelector(); protected: PLModel *model; diff --git a/modules/gui/qt4/components/preferences_widgets.cpp b/modules/gui/qt4/components/preferences_widgets.cpp index 2a13748f23..60747bee69 100644 --- a/modules/gui/qt4/components/preferences_widgets.cpp +++ b/modules/gui/qt4/components/preferences_widgets.cpp @@ -130,12 +130,11 @@ ConfigControl *ConfigControl::createControl( vlc_object_t *p_this, l, line ); break; case CONFIG_ITEM_FILE: - p_control = new FileConfigControl( p_this, p_item, parent, l, - line, false ); + p_control = new FileConfigControl( p_this, p_item, parent, l, line); break; case CONFIG_ITEM_DIRECTORY: p_control = new DirectoryConfigControl( p_this, p_item, parent, l, - line, false ); + line ); break; #if 0 case CONFIG_ITEM_FONT: @@ -237,6 +236,7 @@ StringConfigControl::StringConfigControl( vlc_object_t *_p_this, VStringConfigControl( _p_this, _p_item ) { text = _text; + if( pwd ) text->setEchoMode( QLineEdit::Password ); label = _label; finish( ); } @@ -253,7 +253,7 @@ void StringConfigControl::finish() FileConfigControl::FileConfigControl( vlc_object_t *_p_this, module_config_t *_p_item, QWidget *_parent, QGridLayout *l, - int &line, bool pwd ) : + int &line ) : VStringConfigControl( _p_this, _p_item, _parent ) { label = new QLabel( qtr(p_item->psz_text) ); @@ -288,7 +288,7 @@ FileConfigControl::FileConfigControl( vlc_object_t *_p_this, FileConfigControl::FileConfigControl( vlc_object_t *_p_this, module_config_t *_p_item, QLabel *_label, QLineEdit *_text, - QPushButton *_button, bool pwd ): + QPushButton *_button ): VStringConfigControl( _p_this, _p_item ) { browse = _button; @@ -319,14 +319,14 @@ void FileConfigControl::finish() /********* String / Directory **********/ DirectoryConfigControl::DirectoryConfigControl( vlc_object_t *_p_this, module_config_t *_p_item, QWidget *_p_widget, - QGridLayout *_p_layout, int& _int, bool _pwd ) : - FileConfigControl( _p_this, _p_item, _p_widget, _p_layout, _int, _pwd) + QGridLayout *_p_layout, int& _int ) : + FileConfigControl( _p_this, _p_item, _p_widget, _p_layout, _int ) {} DirectoryConfigControl::DirectoryConfigControl( vlc_object_t *_p_this, module_config_t *_p_item, QLabel *_p_label, - QLineEdit *_p_line, QPushButton *_p_button, bool _pwd ): - FileConfigControl( _p_this, _p_item, _p_label, _p_line, _p_button, _pwd) + QLineEdit *_p_line, QPushButton *_p_button ): + FileConfigControl( _p_this, _p_item, _p_label, _p_line, _p_button) {} void DirectoryConfigControl::updateField() @@ -486,7 +486,7 @@ QString StringListConfigControl::getValue() } void setfillVLCConfigCombo( const char *configname, intf_thread_t *p_intf, - QComboBox *combo, QWidget *parent ) + QComboBox *combo ) { module_config_t *p_config = config_FindConfig( VLC_OBJECT(p_intf), configname ); @@ -654,7 +654,7 @@ ModuleListConfigControl::~ModuleListConfigControl() QCheckBox *cb = new QCheckBox( qtr( module_GetLongName( p_parser ) ) );\ checkBoxListItem *cbl = new checkBoxListItem; \ \ - CONNECT( cb, stateChanged( int ), this, onUpdate( int ) );\ + CONNECT( cb, stateChanged( int ), this, onUpdate() );\ cb->setToolTip( formatTooltip( qtr( module_get_help( p_parser ))));\ cbl->checkBox = cb; \ \ @@ -732,7 +732,7 @@ void ModuleListConfigControl::show() } -void ModuleListConfigControl::onUpdate( int value ) +void ModuleListConfigControl::onUpdate() { text->clear(); bool first = true; @@ -998,6 +998,7 @@ BoolConfigControl::BoolConfigControl( vlc_object_t *_p_this, VIntConfigControl( _p_this, _p_item ) { checkbox = _checkbox; + label = _label; finish(); } @@ -1006,6 +1007,8 @@ void BoolConfigControl::finish() checkbox->setCheckState( p_item->value.i == true ? Qt::Checked : Qt::Unchecked ); checkbox->setToolTip( formatTooltip(qtr(p_item->psz_longtext)) ); + if( label ) + label->setToolTip( formatTooltip(qtr(p_item->psz_longtext)) ); } int BoolConfigControl::getValue() diff --git a/modules/gui/qt4/components/preferences_widgets.hpp b/modules/gui/qt4/components/preferences_widgets.hpp index eed6aab79d..39e2baf42a 100644 --- a/modules/gui/qt4/components/preferences_widgets.hpp +++ b/modules/gui/qt4/components/preferences_widgets.hpp @@ -192,6 +192,7 @@ public: virtual int getType() { return CONFIG_ITEM_BOOL; } private: QCheckBox *checkbox; + QLabel *label; void finish(); }; @@ -283,9 +284,9 @@ class FileConfigControl : public VStringConfigControl Q_OBJECT; public: FileConfigControl( vlc_object_t *, module_config_t *, QWidget *, - QGridLayout *, int&, bool pwd ); + QGridLayout *, int& ); FileConfigControl( vlc_object_t *, module_config_t *, QLabel *, - QLineEdit *, QPushButton *, bool pwd ); + QLineEdit *, QPushButton * ); virtual ~FileConfigControl() {}; virtual QString getValue() { return text->text(); }; virtual void show() { text->show(); if( label ) label->show(); browse->show(); } @@ -304,9 +305,9 @@ class DirectoryConfigControl : public FileConfigControl Q_OBJECT; public: DirectoryConfigControl( vlc_object_t *, module_config_t *, QWidget *, - QGridLayout *, int&, bool pwd ); + QGridLayout *, int& ); DirectoryConfigControl( vlc_object_t *, module_config_t *, QLabel *, - QLineEdit *, QPushButton *, bool pwd ); + QLineEdit *, QPushButton * ); virtual ~DirectoryConfigControl() {}; public slots: virtual void updateField(); @@ -363,7 +364,7 @@ public: virtual void hide(); virtual void show(); public slots: - void onUpdate( int value ); + void onUpdate(); private: void finish( bool ); QVector modules; @@ -393,7 +394,7 @@ private slots: }; void setfillVLCConfigCombo(const char *configname, intf_thread_t *p_intf, - QComboBox *combo, QWidget *parent = 0 ); + QComboBox *combo ); #if 0 struct ModuleCheckBox { diff --git a/modules/gui/qt4/components/simple_preferences.cpp b/modules/gui/qt4/components/simple_preferences.cpp index 7f4d601b0e..d77d6a183a 100644 --- a/modules/gui/qt4/components/simple_preferences.cpp +++ b/modules/gui/qt4/components/simple_preferences.cpp @@ -139,8 +139,7 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent, if( p_config ) \ { \ control = new type ## ConfigControl( VLC_OBJECT(p_intf), \ - p_config, label, qcontrol, qbutton, \ - false ); \ + p_config, label, qcontrol, qbutton ); \ controls.append( control ); \ } diff --git a/modules/gui/qt4/dialogs/bookmarks.cpp b/modules/gui/qt4/dialogs/bookmarks.cpp index 799e2690c5..1b66907781 100644 --- a/modules/gui/qt4/dialogs/bookmarks.cpp +++ b/modules/gui/qt4/dialogs/bookmarks.cpp @@ -197,7 +197,7 @@ void BookmarksDialog::edit( QTreeWidgetItem *item, int column ) // We get the bookmarks list seekpoint_t** pp_bookmarks; - seekpoint_t* p_seekpoint; + seekpoint_t* p_seekpoint = NULL; int i_bookmarks; if( input_Control( p_input, INPUT_GET_BOOKMARKS, &pp_bookmarks, diff --git a/modules/gui/qt4/dialogs/messages.cpp b/modules/gui/qt4/dialogs/messages.cpp index 48d4b674a0..2cd54e7bda 100644 --- a/modules/gui/qt4/dialogs/messages.cpp +++ b/modules/gui/qt4/dialogs/messages.cpp @@ -51,7 +51,7 @@ class MsgEvent : public QEvent { public: MsgEvent( msg_item_t *msg ) - : msg(msg), QEvent( (QEvent::Type)MsgEvent_Type ) + : QEvent( (QEvent::Type)MsgEvent_Type ), msg(msg) { msg_Hold( msg ); } diff --git a/modules/gui/qt4/dialogs/open.cpp b/modules/gui/qt4/dialogs/open.cpp index 339ef03fc9..d66858bf5a 100644 --- a/modules/gui/qt4/dialogs/open.cpp +++ b/modules/gui/qt4/dialogs/open.cpp @@ -320,7 +320,7 @@ void OpenDialog::finish( bool b_enqueue = false ) if( i_action_flag != SELECT ) { QStringList tempMRL = SeparateEntries( mrl ); - for( size_t i = 0; i < tempMRL.size(); i++ ) + for( int i = 0; i < tempMRL.size(); i++ ) { bool b_start = !i && !b_enqueue; input_item_t *p_input; diff --git a/modules/gui/qt4/dialogs/sout.cpp b/modules/gui/qt4/dialogs/sout.cpp index 84cf6af5d9..dddc86bdc1 100644 --- a/modules/gui/qt4/dialogs/sout.cpp +++ b/modules/gui/qt4/dialogs/sout.cpp @@ -524,7 +524,7 @@ void SoutDialog::updateMRL() SoutMrl smrl( ":sout=#" ); - if ( ui.transcodeVideo->isChecked() || ui.transcodeAudio->isChecked() + if ( ( ui.transcodeVideo->isChecked() || ui.transcodeAudio->isChecked() ) && !ui.rawInput->isChecked() /*demuxdump speciality*/ ) { smrl.begin( "transcode" ); diff --git a/modules/gui/qt4/dialogs/toolbar.cpp b/modules/gui/qt4/dialogs/toolbar.cpp index 928c24eb36..2c76c0b8cc 100644 --- a/modules/gui/qt4/dialogs/toolbar.cpp +++ b/modules/gui/qt4/dialogs/toolbar.cpp @@ -504,10 +504,14 @@ void DroppingController::dropEvent( QDropEvent *event ) void DroppingController::dragLeaveEvent ( QDragLeaveEvent * event ) { if( rubberband ) rubberband->hide(); + event->accept(); } /** * Overloading doAction to block any action **/ -void DroppingController::doAction( int i ){} +void DroppingController::doAction( int i ) +{ + VLC_UNUSED( i ); +} diff --git a/modules/gui/qt4/dialogs/vlm.cpp b/modules/gui/qt4/dialogs/vlm.cpp index 5798b5e8e9..a297072e0a 100644 --- a/modules/gui/qt4/dialogs/vlm.cpp +++ b/modules/gui/qt4/dialogs/vlm.cpp @@ -694,6 +694,8 @@ void VLMWrapper::EnableItem( const QString name, bool b_enable ) { vlm_message_t *message; QString command = "setup \"" + name + ( b_enable ? " enable" : " disable" ); + vlm_ExecuteCommand( p_vlm, qtu( command ), &message ); + vlm_MessageDelete( message ); } void VLMWrapper::ControlBroadcast( const QString name, int BroadcastStatus, diff --git a/modules/gui/qt4/dialogs_provider.cpp b/modules/gui/qt4/dialogs_provider.cpp index a193cb2369..cde5e5f544 100644 --- a/modules/gui/qt4/dialogs_provider.cpp +++ b/modules/gui/qt4/dialogs_provider.cpp @@ -503,7 +503,6 @@ void DialogsProvider::saveAPlaylist() QString file = qfd->selectedFiles().first(); QString filter = qfd->selectedFilter(); - const char* filt = filter.toAscii(); if( file.contains( ".xsp" ) || filter.contains( "XSPF" ) ) { @@ -605,7 +604,7 @@ void DialogsProvider::loadSubtitlesFile() void DialogsProvider::menuAction( QObject *data ) { - QVLCMenu::DoAction( p_intf, data ); + QVLCMenu::DoAction( data ); } void DialogsProvider::menuUpdateAction( QObject *data ) diff --git a/modules/gui/qt4/main_interface.cpp b/modules/gui/qt4/main_interface.cpp index 97cf1e185f..fd02b67c83 100644 --- a/modules/gui/qt4/main_interface.cpp +++ b/modules/gui/qt4/main_interface.cpp @@ -901,13 +901,17 @@ void MainInterface::handleSystrayClick( switch( reason ) { case QSystemTrayIcon::Trigger: + case QSystemTrayIcon::DoubleClick: toggleUpdateSystrayMenu(); break; case QSystemTrayIcon::MiddleClick: + case QSystemTrayIcon::Context: sysTray->showMessage( qtr( "VLC media player" ), qtr( "Control menu for the player" ), QSystemTrayIcon::Information, 3000 ); break; + default: + break; } } @@ -1072,6 +1076,7 @@ void MainInterface::wheelEvent( QWheelEvent *e ) void MainInterface::closeEvent( QCloseEvent *e ) { + e->accept(); hide(); THEDP->quit(); } diff --git a/modules/gui/qt4/menus.cpp b/modules/gui/qt4/menus.cpp index a3e9dddd7e..2c32d25761 100644 --- a/modules/gui/qt4/menus.cpp +++ b/modules/gui/qt4/menus.cpp @@ -276,6 +276,7 @@ static QAction * FindActionWithVar( QMenu *menu, const char *psz_var ) void QVLCMenu::createMenuBar( MainInterface *mi, intf_thread_t *p_intf, bool visual_selector_enabled ) +/* FIXME remove this visual dependency */ { /* QMainWindows->menuBar() gives the QProcess::destroyed timeout issue on Cleanlooks style with @@ -344,6 +345,7 @@ QMenu *QVLCMenu::FileMenu( intf_thread_t *p_intf ) /* Playlist/MediaLibrary Control */ QMenu *QVLCMenu::ToolsMenu( intf_thread_t *p_intf ) { + VLC_UNUSED( p_intf ); //TODO remove QMenu *menu = new QMenu(); addDPStaticEntry( menu, qtr( I_MENU_EXT ), ":/settings", @@ -595,7 +597,7 @@ QMenu *QVLCMenu::NavigMenu( intf_thread_t *p_intf, QMenu *menu ) { vlc_object_release( p_object ); } - return Populate( p_intf, menu, varnames, objects, true ); + return Populate( p_intf, menu, varnames, objects ); } /** @@ -699,7 +701,7 @@ void QVLCMenu::PopupMenuControlEntries( QMenu *menu, ":/next", SLOT( next() ) ); } -void QVLCMenu::PopupMenuStaticEntries( intf_thread_t *p_intf, QMenu *menu ) +void QVLCMenu::PopupMenuStaticEntries( QMenu *menu ) { #if 0 QMenu *toolsmenu = ToolsMenu( p_intf, menu, false, true ); @@ -772,7 +774,6 @@ void QVLCMenu::AudioPopupMenu( intf_thread_t *p_intf ) /* Navigation stuff, and general menus ( open ) */ void QVLCMenu::MiscPopupMenu( intf_thread_t *p_intf ) { - vlc_value_t val; POPUP_BOILERPLATE; if( p_input ) @@ -790,7 +791,7 @@ void QVLCMenu::MiscPopupMenu( intf_thread_t *p_intf ) PopupMenuControlEntries( menu, p_intf, p_input ); menu->addSeparator(); - PopupMenuStaticEntries( p_intf, menu ); + PopupMenuStaticEntries( menu ); p_intf->p_sys->p_popup_menu = menu; menu->popup( QCursor::pos() ); @@ -914,7 +915,7 @@ void QVLCMenu::PopupMenu( intf_thread_t *p_intf, bool show ) menu->addMenu( submenu ); } - PopupMenuStaticEntries( p_intf, menu ); + PopupMenuStaticEntries( menu ); p_intf->p_sys->p_popup_menu = menu; p_intf->p_sys->p_popup_menu->popup( QCursor::pos() ); @@ -979,8 +980,7 @@ void QVLCMenu::updateSystrayMenu( MainInterface *mi, QMenu * QVLCMenu::Populate( intf_thread_t *p_intf, QMenu *current, vector< const char *> & varnames, - vector & objects, - bool append ) + vector & objects ) { QMenu *menu = current; if( !menu ) menu = new QMenu(); @@ -1299,7 +1299,7 @@ void QVLCMenu::CreateAndConnect( QMenu *menu, const char *psz_var, menu->addAction( action ); } -void QVLCMenu::DoAction( intf_thread_t *p_intf, QObject *data ) +void QVLCMenu::DoAction( QObject *data ) { MenuItemData *itemData = qobject_cast( data ); vlc_object_t *p_object = itemData->p_obj; diff --git a/modules/gui/qt4/menus.hpp b/modules/gui/qt4/menus.hpp index b4c4d7b9f8..e9d02b1503 100644 --- a/modules/gui/qt4/menus.hpp +++ b/modules/gui/qt4/menus.hpp @@ -92,7 +92,7 @@ public: bool b_force_visible = false); /* Actions */ - static void DoAction( intf_thread_t *, QObject * ); + static void DoAction( QObject * ); /* HACK for minimalView */ static QAction *minimalViewAction; @@ -111,13 +111,12 @@ private: static QMenu *HelpMenu( QMenu * ); /* Popups Menus */ - static void PopupMenuStaticEntries( intf_thread_t *p_intf, QMenu *menu ); + static void PopupMenuStaticEntries( QMenu *menu ); static void PopupMenuControlEntries( QMenu *menu, intf_thread_t *p_intf, input_thread_t *p_input ); /* Generic automenu methods */ static QMenu * Populate( intf_thread_t *, QMenu *current, - vector&, vector&, - bool append = false ); + vector&, vector& ); static void CreateAndConnect( QMenu *, const char *, QString, QString, int, vlc_object_t *, vlc_value_t, int, bool c = false ); diff --git a/modules/gui/qt4/qt4.cpp b/modules/gui/qt4/qt4.cpp index 26bb0b08a5..f1216da1a2 100644 --- a/modules/gui/qt4/qt4.cpp +++ b/modules/gui/qt4/qt4.cpp @@ -63,7 +63,6 @@ static void Close ( vlc_object_t * ); static int OpenDialogs ( vlc_object_t * ); static int WindowOpen ( vlc_object_t * ); static void WindowClose ( vlc_object_t * ); -static void Run ( intf_thread_t * ); static void *Thread ( void * ); static void ShowDialog ( intf_thread_t *, int, int, intf_dialog_args_t * ); @@ -317,7 +316,6 @@ static void *Thread( void *obj ) { intf_thread_t *p_intf = (intf_thread_t *)obj; MainInterface *p_mi; - vlc_value_t val; char dummy[] = ""; char *argv[] = { dummy }; int argc = 1; diff --git a/modules/gui/qt4/util/input_slider.cpp b/modules/gui/qt4/util/input_slider.cpp index c5e490c383..2952af3969 100644 --- a/modules/gui/qt4/util/input_slider.cpp +++ b/modules/gui/qt4/util/input_slider.cpp @@ -78,6 +78,7 @@ void InputSlider::userDrag( int new_value ) void InputSlider::mouseReleaseEvent( QMouseEvent *event ) { b_isSliding = false; + event->accept(); } void InputSlider::mousePressEvent(QMouseEvent* event) @@ -263,5 +264,6 @@ void SoundSlider::paintEvent( QPaintEvent *e ) QString::number( value() ) + '%' ); painter.end(); + e->accept(); } -- 2.39.2