Commit 33179cc3 authored by Rémi Duraffort's avatar Rémi Duraffort

qt4: use const for QString when it's possible.

parent 98f134c2
......@@ -99,7 +99,7 @@ void AbstractController::setupButton( QAbstractButton *aButton )
/* Open the generic config line for the toolbar, parse it
* and create the widgets accordingly */
void AbstractController::parseAndCreate( QString config,
void AbstractController::parseAndCreate( const QString& config,
QBoxLayout *controlLayout )
{
QStringList list = config.split( ";", QString::SkipEmptyParts ) ;
......
......@@ -143,7 +143,7 @@ protected:
AdvControlsWidget *advControls;
void parseAndCreate( QString config, QBoxLayout *controlLayout );
void parseAndCreate( const QString& config, QBoxLayout *controlLayout );
virtual void createAndAddWidget( QBoxLayout *controlLayout, int i_index,
buttonType_e i_type, int i_option );
......
......@@ -402,7 +402,7 @@ QStringList PLModel::selectedURIs()
char *psz = input_item_GetURI( p_item->p_input );
if( psz )
{
lst.append( QString( psz ) );
lst.append( psz );
free( psz );
}
}
......@@ -763,7 +763,7 @@ next:
rebuild();
}
void PLModel::search( QString search_text )
void PLModel::search( const QString& search_text )
{
/** \todo Fire the search with a small delay ? */
PL_LOCK;
......@@ -771,7 +771,7 @@ void PLModel::search( QString search_text )
playlist_item_t *p_root = playlist_ItemGetById( p_playlist,
rootItem->i_id );
assert( p_root );
char *psz_name = search_text.toUtf8().data();
const char *psz_name = search_text.toUtf8().data();
playlist_LiveSearchUpdate( p_playlist , p_root, psz_name );
}
PL_UNLOCK;
......
......@@ -113,7 +113,7 @@ public:
/* Actions made by the views */
void popup( QModelIndex & index, QPoint &point, QModelIndexList list );
void doDelete( QModelIndexList selected );
void search( QString search );
void search( const QString& search_text );
void sort( int column, Qt::SortOrder order );
void removeItem( int );
......
......@@ -1311,7 +1311,7 @@ void KeySelectorControl::doApply()
}
KeyInputDialog::KeyInputDialog( QTreeWidget *_table,
QString keyToChange,
const QString& keyToChange,
QWidget *_parent ) :
QDialog( _parent ), keyValue(0)
{
......
......@@ -460,7 +460,7 @@ private slots:
class KeyInputDialog : public QDialog
{
public:
KeyInputDialog( QTreeWidget *, QString, QWidget * );
KeyInputDialog( QTreeWidget *, const QString&, QWidget * );
int keyValue;
bool conflicts;
private:
......
......@@ -109,7 +109,7 @@ void VLCProfileSelector::editProfile()
profileBox->itemData( profileBox->currentIndex() ).toString() );
}
void VLCProfileSelector::editProfile( QString qs, QString value )
void VLCProfileSelector::editProfile( const QString& qs, const QString& value )
{
VLCProfileEditor *editor = new VLCProfileEditor( qs, value, this );
......@@ -212,7 +212,7 @@ void VLCProfileSelector::updateOptions( int i )
/**
* VLCProfileEditor
**/
VLCProfileEditor::VLCProfileEditor( QString qs_name, QString value,
VLCProfileEditor::VLCProfileEditor( const QString& qs_name, const QString& value,
QWidget *_parent )
: QVLCDialog( _parent, NULL )
{
......@@ -293,7 +293,7 @@ inline void VLCProfileEditor::registerCodecs()
ADD_SCODEC( "T.140", "t140" )
}
void VLCProfileEditor::fillProfile( QString qs )
void VLCProfileEditor::fillProfile( const QString& qs )
{
QStringList options = qs.split( ";" );
if( options.size() < 16 )
......
......@@ -43,7 +43,7 @@ public:
private:
QComboBox *profileBox;
void fillProfilesCombo();
void editProfile( QString, QString );
void editProfile( const QString&, const QString& );
void saveProfiles();
QString mux;
QString transcode;
......@@ -62,14 +62,14 @@ class VLCProfileEditor : public QVLCDialog
Ui::Profiles ui;
public:
VLCProfileEditor( QString, QString, QWidget * );
VLCProfileEditor( const QString&, const QString&, QWidget * );
QString name;
QString muxValue;
QString transcodeValue();
private:
void registerCodecs();
void fillProfile( QString qs );
void fillProfile( const QString& qs );
protected slots:
virtual void close();
private slots:
......
......@@ -34,7 +34,7 @@
#include <QLineEdit>
#include <QFileDialog>
SoutInputBox::SoutInputBox( QWidget *_parent, QString mrl ) : QGroupBox( _parent )
SoutInputBox::SoutInputBox( QWidget *_parent, const QString& mrl ) : QGroupBox( _parent )
{
/**
* Source Block
......@@ -62,7 +62,7 @@ SoutInputBox::SoutInputBox( QWidget *_parent, QString mrl ) : QGroupBox( _parent
sourceLayout->addWidget( line, 2, 0, 1, -1 );
}
void SoutInputBox::setMRL( QString mrl )
void SoutInputBox::setMRL( const QString& mrl )
{
sourceLine->setText( mrl );
QString type;
......@@ -104,7 +104,7 @@ FileDestBox::FileDestBox( QWidget *_parent ) : VirtualDestBox( _parent )
BUTTONACT( fileSelectButton, fileBrowse() );
}
QString FileDestBox::getMRL( QString mux )
QString FileDestBox::getMRL( const QString& mux )
{
if( fileEdit->text().isEmpty() ) return "";
......@@ -158,7 +158,7 @@ HTTPDestBox::HTTPDestBox( QWidget *_parent ) : VirtualDestBox( _parent )
CT( HTTPEdit );
}
QString HTTPDestBox::getMRL( QString mux )
QString HTTPDestBox::getMRL( const QString& mux )
{
if( HTTPEdit->text().isEmpty() ) return "";
......@@ -202,7 +202,7 @@ MMSHDestBox::MMSHDestBox( QWidget *_parent ) : VirtualDestBox( _parent )
CT( MMSHEdit );
}
QString MMSHDestBox::getMRL( QString mux )
QString MMSHDestBox::getMRL( const QString& mux )
{
if( MMSHEdit->text().isEmpty() ) return "";
......@@ -246,7 +246,7 @@ UDPDestBox::UDPDestBox( QWidget *_parent ) : VirtualDestBox( _parent )
CT( UDPEdit );
}
QString UDPDestBox::getMRL( QString mux )
QString UDPDestBox::getMRL( const QString& mux )
{
if( UDPEdit->text().isEmpty() ) return "";
......@@ -317,7 +317,7 @@ RTPDestBox::RTPDestBox( QWidget *_parent ) : VirtualDestBox( _parent )
CT( RTPEdit );
}
QString RTPDestBox::getMRL( QString mux )
QString RTPDestBox::getMRL( const QString& mux )
{
if( RTPEdit->text().isEmpty() ) return "";
......@@ -380,7 +380,7 @@ ICEDestBox::ICEDestBox( QWidget *_parent ) : VirtualDestBox( _parent )
CT( ICEPassEdit );
}
QString ICEDestBox::getMRL( QString mux )
QString ICEDestBox::getMRL( const QString& mux )
{
if( ICEEdit->text().isEmpty() ) return "";
......
......@@ -35,9 +35,9 @@ class QSpinBox;
class SoutInputBox : public QGroupBox
{
public:
SoutInputBox( QWidget *_parent = NULL, QString mrl = "" );
SoutInputBox( QWidget *_parent = NULL, const QString& mrl = "" );
void setMRL( QString );
void setMRL( const QString& );
private:
QLineEdit *sourceLine;
QLabel *sourceValueLabel;
......@@ -49,7 +49,7 @@ class VirtualDestBox : public QWidget
Q_OBJECT;
public:
VirtualDestBox( QWidget *_parent = NULL ) : QWidget( _parent ){}
virtual QString getMRL( QString ) = 0;
virtual QString getMRL( const QString& ) = 0;
protected:
QString mrl;
signals:
......@@ -61,7 +61,7 @@ class FileDestBox: public VirtualDestBox
Q_OBJECT;
public:
FileDestBox( QWidget *_parent = NULL );
virtual QString getMRL( QString );
virtual QString getMRL( const QString& );
private:
QLineEdit *fileEdit;
private slots:
......@@ -73,7 +73,7 @@ class HTTPDestBox: public VirtualDestBox
Q_OBJECT;
public:
HTTPDestBox( QWidget *_parent = NULL );
virtual QString getMRL( QString );
virtual QString getMRL( const QString& );
private:
QLineEdit *HTTPEdit;
QSpinBox *HTTPPort;
......@@ -84,7 +84,7 @@ class MMSHDestBox: public VirtualDestBox
Q_OBJECT;
public:
MMSHDestBox( QWidget *_parent = NULL );
virtual QString getMRL( QString );
virtual QString getMRL( const QString& );
private:
QLineEdit *MMSHEdit;
QSpinBox *MMSHPort;
......@@ -95,7 +95,7 @@ class UDPDestBox: public VirtualDestBox
Q_OBJECT;
public:
UDPDestBox( QWidget *_parent = NULL );
virtual QString getMRL( QString );
virtual QString getMRL( const QString& );
private:
QLineEdit *UDPEdit;
QSpinBox *UDPPort;
......@@ -106,7 +106,7 @@ class RTPDestBox: public VirtualDestBox
Q_OBJECT;
public:
RTPDestBox( QWidget *_parent = NULL );
virtual QString getMRL( QString );
virtual QString getMRL( const QString& );
private:
QLineEdit *RTPEdit;
QSpinBox *RTPPort;
......@@ -119,7 +119,7 @@ class ICEDestBox: public VirtualDestBox
Q_OBJECT;
public:
ICEDestBox( QWidget *_parent = NULL );
virtual QString getMRL( QString );
virtual QString getMRL( const QString& );
private:
QLineEdit *ICEEdit;
QLineEdit *ICEMountEdit;
......
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