Commit 94c64e32 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt: kill many warnings.

parent 2efec9cf
......@@ -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++;
}
......
......@@ -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();
}
/**
......
......@@ -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__ );
......
......@@ -31,11 +31,11 @@
#include <vlc_common.h>
#include <vlc_aout.h>
#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 <QTabWidget>
......
......@@ -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
......
......@@ -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:
......
......@@ -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(
......
......@@ -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();
}
......@@ -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();
}
};
......
......@@ -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 */
......
......@@ -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 );
......
......@@ -32,8 +32,7 @@
#include <QHeaderView>
#include <QTreeView>
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 );
......
......@@ -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;
......
......@@ -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()
......
......@@ -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<checkBoxListItem*> 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 {
......
......@@ -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 ); \
}
......
......@@ -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,
......
......@@ -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 );
}
......
......@@ -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;
......
......@@ -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" );
......
......@@ -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 );
}
......@@ -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,
......
......@@ -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 )
......
......@@ -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();
}
......
......@@ -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<vlc_object_t *> & objects,
bool append )
vector<vlc_object_t *> & 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<MenuItemData *>( data );
vlc_object_t *p_object = itemData->p_obj;
......
......@@ -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<const char*>&, vector<vlc_object_t *>&,
bool append = false );
vector<const char*>&, vector<vlc_object_t *>& );
static void CreateAndConnect( QMenu *, const char *, QString, QString,
int, vlc_object_t *, vlc_value_t, int, bool c = false );
......
......@@ -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;
......
......@@ -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();
}
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