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

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" );
......
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