[vlc-devel] commit: Qt: add some missing const. ( Rémi Duraffort )
git version control
git at videolan.org
Tue Jul 21 09:00:17 CEST 2009
vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Mon Jul 20 15:23:49 2009 +0200| [5b308d06340c9933c412ac8d028ae1beb1da588c] | committer: Rémi Duraffort
Qt: add some missing const.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=5b308d06340c9933c412ac8d028ae1beb1da588c
---
modules/gui/qt4/dialogs_provider.cpp | 8 ++++----
modules/gui/qt4/dialogs_provider.hpp | 8 ++++----
modules/gui/qt4/input_manager.hpp | 2 +-
modules/gui/qt4/main_interface.cpp | 18 +++++++++---------
modules/gui/qt4/main_interface.hpp | 6 +++---
5 files changed, 21 insertions(+), 21 deletions(-)
diff --git a/modules/gui/qt4/dialogs_provider.cpp b/modules/gui/qt4/dialogs_provider.cpp
index 2641b8b..fe52025 100644
--- a/modules/gui/qt4/dialogs_provider.cpp
+++ b/modules/gui/qt4/dialogs_provider.cpp
@@ -373,9 +373,9 @@ void DialogsProvider::MLAppendDialog( int tab )
/**
* Simple open
***/
-QStringList DialogsProvider::showSimpleOpen( QString help,
+QStringList DialogsProvider::showSimpleOpen( const QString& help,
int filters,
- QString path )
+ const QString& path )
{
QString fileTypes = "";
if( filters & EXT_FILTER_MEDIA ) {
@@ -565,7 +565,7 @@ void DialogsProvider::saveAPlaylist()
****************************************************************************/
void DialogsProvider::streamingDialog( QWidget *parent,
- QString mrl,
+ const QString& mrl,
bool b_transcode_only,
QStringList options )
{
@@ -686,7 +686,7 @@ void DialogsProvider::menuUpdateAction( QObject *data )
func->doFunc( p_intf );
}
-void DialogsProvider::SDMenuAction( QString data )
+void DialogsProvider::SDMenuAction( const QString& data )
{
char *psz_sd = strdup( qtu( data ) );
if( !playlist_IsServicesDiscoveryLoaded( THEPL, psz_sd ) )
diff --git a/modules/gui/qt4/dialogs_provider.hpp b/modules/gui/qt4/dialogs_provider.hpp
index d65de88..e6c66b3 100644
--- a/modules/gui/qt4/dialogs_provider.hpp
+++ b/modules/gui/qt4/dialogs_provider.hpp
@@ -112,11 +112,11 @@ public:
return ( instance != NULL );
}
- QStringList showSimpleOpen( QString help = QString(),
+ QStringList showSimpleOpen( const QString& help = QString(),
int filters = EXT_FILTER_MEDIA |
EXT_FILTER_VIDEO | EXT_FILTER_AUDIO |
EXT_FILTER_PLAYLIST,
- QString path = QString() );
+ const QString& path = QString() );
bool isDying() { return b_isDying; }
protected:
QSignalMapper *menusMapper;
@@ -179,7 +179,7 @@ public slots:
void PLAppendDir();
void MLAppendDir();
- void streamingDialog( QWidget *parent, QString mrl, bool b_stream = true,
+ void streamingDialog( QWidget *parent, const QString& mrl, bool b_stream = true,
QStringList options = QStringList("") );
void openAndStreamingDialogs();
void openAndTranscodingDialogs();
@@ -193,7 +193,7 @@ public slots:
private slots:
void menuAction( QObject *);
void menuUpdateAction( QObject * );
- void SDMenuAction( QString );
+ void SDMenuAction( const QString& );
signals:
void toolBarConfUpdated();
};
diff --git a/modules/gui/qt4/input_manager.hpp b/modules/gui/qt4/input_manager.hpp
index 98a1bbe..4df6beb 100644
--- a/modules/gui/qt4/input_manager.hpp
+++ b/modules/gui/qt4/input_manager.hpp
@@ -178,7 +178,7 @@ signals:
/// Send new position, new time and new length
void positionUpdated( float , int, int );
void rateChanged( int );
- void nameChanged( QString );
+ void nameChanged( const QString& );
/// Used to signal whether we should show navigation buttons
void titleChanged( bool );
void chapterChanged( bool );
diff --git a/modules/gui/qt4/main_interface.cpp b/modules/gui/qt4/main_interface.cpp
index ae71307..1b1b46c 100644
--- a/modules/gui/qt4/main_interface.cpp
+++ b/modules/gui/qt4/main_interface.cpp
@@ -178,19 +178,19 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf )
* them down.
*/
/* Naming in the controller statusbar */
- CONNECT( THEMIM->getIM(), nameChanged( QString ),
- this, setName( QString ) );
+ CONNECT( THEMIM->getIM(), nameChanged( const QString& ),
+ this, setName( const QString& ) );
/* and in the systray */
if( sysTray )
{
- CONNECT( THEMIM->getIM(), nameChanged( QString ), this,
- updateSystrayTooltipName( QString ) );
+ CONNECT( THEMIM->getIM(), nameChanged( const QString& ), this,
+ updateSystrayTooltipName( const QString& ) );
}
/* and in the title of the controller */
if( config_GetInt( p_intf, "qt-name-in-title" ) )
{
- CONNECT( THEMIM->getIM(), nameChanged( QString ), this,
- setVLCWindowsTitle( QString ) );
+ CONNECT( THEMIM->getIM(), nameChanged( const QString& ), this,
+ setVLCWindowsTitle( const QString& ) );
}
/**
@@ -910,7 +910,7 @@ void MainInterface::visual()
/************************************************************************
* Other stuff
************************************************************************/
-void MainInterface::setName( QString name )
+void MainInterface::setName( const QString& name )
{
input_name = name; /* store it for the QSystray use */
/* Display it in the status bar, but also as a Tooltip in case it doesn't
@@ -923,7 +923,7 @@ void MainInterface::setName( QString name )
* Give the decorations of the Main Window a correct Name.
* If nothing is given, set it to VLC...
**/
-void MainInterface::setVLCWindowsTitle( QString aTitle )
+void MainInterface::setVLCWindowsTitle( const QString& aTitle )
{
if( aTitle.isEmpty() )
{
@@ -1048,7 +1048,7 @@ void MainInterface::handleSystrayClick(
* Updates the name of the systray Icon tooltip.
* Doesn't check if the systray exists, check before you call it.
**/
-void MainInterface::updateSystrayTooltipName( QString name )
+void MainInterface::updateSystrayTooltipName( const QString& name )
{
if( name.isEmpty() )
{
diff --git a/modules/gui/qt4/main_interface.hpp b/modules/gui/qt4/main_interface.hpp
index 4ea7ba3..03f18a2 100644
--- a/modules/gui/qt4/main_interface.hpp
+++ b/modules/gui/qt4/main_interface.hpp
@@ -167,13 +167,13 @@ private slots:
void destroyPopupMenu();
void recreateToolbars();
void doComponentsUpdate();
- void setName( QString );
- void setVLCWindowsTitle( QString title = "" );
+ void setName( const QString& );
+ void setVLCWindowsTitle( const QString& title = "" );
#if 0
void visual();
#endif
void handleSystrayClick( QSystemTrayIcon::ActivationReason );
- void updateSystrayTooltipName( QString );
+ void updateSystrayTooltipName( const QString& );
void updateSystrayTooltipStatus( int );
void showCryptedLabel( bool );
More information about the vlc-devel
mailing list