Commit b7cf7dda authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt, menus: std::vector -> QVector

parent cfd14b54
......@@ -416,7 +416,7 @@ public:
virtual ~StringConfigControl();
virtual QString getValue();
private:
std::vector<ModuleCheckBox> checkboxes;
QVector<ModuleCheckBox> checkboxes;
QLineEdit *text;
private slot:
void OnUpdate();
......
......@@ -200,15 +200,15 @@ static QAction * FindActionWithVar( QMenu *menu, const char *psz_var )
/*****************************************************************************
* Definitions of variables for the dynamic menus
*****************************************************************************/
#define PUSH_VAR( var ) varnames.push_back( var ); \
objects.push_back( VLC_OBJECT(p_object) )
#define PUSH_VAR( var ) varnames.append( var ); \
objects.append( VLC_OBJECT(p_object) )
#define PUSH_INPUTVAR( var ) varnames.push_back( var ); \
objects.push_back( VLC_OBJECT(p_input) );
#define PUSH_INPUTVAR( var ) varnames.append( var ); \
objects.append( VLC_OBJECT(p_input) );
static int InputAutoMenuBuilder( input_thread_t *p_object,
vector<vlc_object_t *> &objects,
vector<const char *> &varnames )
QVector<vlc_object_t *> &objects,
QVector<const char *> &varnames )
{
PUSH_VAR( "bookmark" );
PUSH_VAR( "title" );
......@@ -220,8 +220,8 @@ static int InputAutoMenuBuilder( input_thread_t *p_object,
static int VideoAutoMenuBuilder( vout_thread_t *p_object,
input_thread_t *p_input,
vector<vlc_object_t *> &objects,
vector<const char *> &varnames )
QVector<vlc_object_t *> &objects,
QVector<const char *> &varnames )
{
PUSH_INPUTVAR( "video-es" );
PUSH_INPUTVAR( "spu-es" );
......@@ -245,8 +245,8 @@ static int VideoAutoMenuBuilder( vout_thread_t *p_object,
static int AudioAutoMenuBuilder( audio_output_t *p_object,
input_thread_t *p_input,
vector<vlc_object_t *> &objects,
vector<const char *> &varnames )
QVector<vlc_object_t *> &objects,
QVector<const char *> &varnames )
{
PUSH_INPUTVAR( "audio-es" );
PUSH_VAR( "audio-channels" );
......@@ -528,10 +528,10 @@ QMenu *QVLCMenu::ViewMenu( intf_thread_t *p_intf, QMenu *current, MainInterface
**/
QMenu *QVLCMenu::InterfacesMenu( intf_thread_t *p_intf, QMenu *current )
{
vector<vlc_object_t *> objects;
vector<const char *> varnames;
varnames.push_back( "intf-add" );
objects.push_back( VLC_OBJECT(p_intf) );
QVector<vlc_object_t *> objects;
QVector<const char *> varnames;
varnames.append( "intf-add" );
objects.append( VLC_OBJECT(p_intf) );
return Populate( p_intf, current, varnames, objects );
}
......@@ -565,8 +565,8 @@ void QVLCMenu::ExtensionsMenu( intf_thread_t *p_intf, QMenu *extMenu )
**/
QMenu *QVLCMenu::AudioMenu( intf_thread_t *p_intf, QMenu * current )
{
vector<vlc_object_t *> objects;
vector<const char *> varnames;
QVector<vlc_object_t *> objects;
QVector<const char *> varnames;
audio_output_t *p_aout;
input_thread_t *p_input;
......@@ -624,8 +624,8 @@ QMenu *QVLCMenu::VideoMenu( intf_thread_t *p_intf, QMenu *current, bool b_subtit
{
vout_thread_t *p_vout;
input_thread_t *p_input;
vector<vlc_object_t *> objects;
vector<const char *> varnames;
QVector<vlc_object_t *> objects;
QVector<const char *> varnames;
if( current->isEmpty() )
{
......@@ -702,8 +702,8 @@ QMenu *QVLCMenu::RebuildNavigMenu( intf_thread_t *p_intf, QMenu *menu )
{
/* */
input_thread_t *p_object;
vector<vlc_object_t *> objects;
vector<const char *> varnames;
QVector<vlc_object_t *> objects;
QVector<const char *> varnames;
/* Get the input and hold it */
p_object = THEMIM->getInput();
......@@ -748,8 +748,8 @@ QMenu *QVLCMenu::HelpMenu( QWidget *parent )
delete menu; menu = NULL; \
if( !show ) \
return; \
vector<vlc_object_t *> objects; \
vector<const char *> varnames; \
QVector<vlc_object_t *> objects; \
QVector<const char *> varnames; \
input_thread_t *p_input = THEMIM->getInput();
#define CREATE_POPUP \
......@@ -914,7 +914,7 @@ void QVLCMenu::MiscPopupMenu( intf_thread_t *p_intf, bool show )
if( p_input )
{
varnames.push_back( "audio-es" );
varnames.append( "audio-es" );
InputAutoMenuBuilder( p_input, objects, varnames );
menu->addSeparator();
}
......@@ -1020,13 +1020,13 @@ void QVLCMenu::PopupMenu( intf_thread_t *p_intf, bool show )
vlc_object_t* p_object = p_intf->p_parent;
objects.clear(); varnames.clear();
objects.push_back( p_object );
varnames.push_back( "intf-skins" );
objects.append( p_object );
varnames.append( "intf-skins" );
Populate( p_intf, submenu, varnames, objects );
objects.clear(); varnames.clear();
objects.push_back( p_object );
varnames.push_back( "intf-skins-interactive" );
objects.append( p_object );
varnames.append( "intf-skins-interactive" );
Populate( p_intf, submenu, varnames, objects );
}
else
......@@ -1105,8 +1105,8 @@ void QVLCMenu::updateSystrayMenu( MainInterface *mi,
*************************************************************************/
QMenu * QVLCMenu::Populate( intf_thread_t *p_intf,
QMenu *current,
vector< const char *> & varnames,
vector<vlc_object_t *> & objects )
QVector< const char *> & varnames,
QVector<vlc_object_t *> & objects )
{
QMenu *menu = current;
assert( menu );
......
......@@ -30,7 +30,7 @@
#include <QObject>
#include <QAction>
#include <QMenu>
#include <vector>
#include <QVector>
using namespace std;
......@@ -131,7 +131,7 @@ private:
/* Generic automenu methods */
static QMenu * Populate( intf_thread_t *, QMenu *current,
vector<const char*>&, vector<vlc_object_t *>& );
QVector<const char*>&, QVector<vlc_object_t *>& );
static void CreateAndConnect( QMenu *, const char *, const QString&,
const QString&, int, vlc_object_t *,
......
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