[vlc-devel] commit: Qt: QString::number is more maintainable than QString("%1"). arg syntax (Jean-Baptiste Kempf )
git version control
git at videolan.org
Sun Mar 15 18:21:49 CET 2009
vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Sun Mar 15 18:20:30 2009 +0100| [c49da8a2c5f576a7de0ad40041e95d1fa68525e8] | committer: Jean-Baptiste Kempf
Qt: QString::number is more maintainable than QString("%1").arg syntax
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c49da8a2c5f576a7de0ad40041e95d1fa68525e8
---
modules/gui/qt4/components/open_panels.cpp | 30 ++++++++++++++--------------
1 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/modules/gui/qt4/components/open_panels.cpp b/modules/gui/qt4/components/open_panels.cpp
index 04e776b..e22d4b2 100644
--- a/modules/gui/qt4/components/open_panels.cpp
+++ b/modules/gui/qt4/components/open_panels.cpp
@@ -1047,12 +1047,12 @@ void CaptureOpenPanel::updateMRL()
else return;
fileList << mrl; mrl = "";
- mrl += " :dvb-frequency=" + QString("%1").arg( bdaFreq->value() );
+ mrl += " :dvb-frequency=" + QString::number( bdaFreq->value() );
if( bdas->isChecked() || bdac->isChecked() )
- mrl += " :dvb-srate=" + QString("%1").arg( bdaSrate->value() );
+ mrl += " :dvb-srate=" + QString::number( bdaSrate->value() );
else if( bdat->isChecked() )
mrl += " :dvb-bandwidth=" +
- QString("%1").arg( bdaBandBox->itemData(
+ QString::number( bdaBandBox->itemData(
bdaBandBox->currentIndex() ).toInt() );
break;
case DSHOW_DEVICE:
@@ -1069,22 +1069,22 @@ void CaptureOpenPanel::updateMRL()
fileList << "v4l://";
mrl += " :v4l-vdev=" + v4lVideoDevice->text();
mrl += " :v4l-adev=" + v4lAudioDevice->text();
- mrl += " :v4l-norm=" + QString("%1").arg( v4lNormBox->currentIndex() );
- mrl += " :v4l-frequency=" + QString("%1").arg( v4lFreq->value() );
+ mrl += " :v4l-norm=" + QString::number( v4lNormBox->currentIndex() );
+ mrl += " :v4l-frequency=" + QString::number( v4lFreq->value() );
break;
case V4L2_DEVICE:
fileList << "v4l2://";
mrl += " :v4l2-dev=" + v4l2VideoDevice->text();
mrl += " :v4l2-adev=" + v4l2AudioDevice->text();
- mrl += " :v4l2-standard=" + QString("%1").arg( v4l2StdBox->currentIndex() );
+ mrl += " :v4l2-standard=" + QString::number( v4l2StdBox->currentIndex() );
break;
case JACK_DEVICE:
mrl = "jack://";
- mrl += "channels=" + QString("%1").arg( jackChannels->value() );
+ mrl += "channels=" + QString::number( jackChannels->value() );
mrl += ":ports=" + jackPortsSelected->text();
fileList << mrl; mrl = "";
- mrl += " :jack-input-caching=" + QString("%1").arg( jackCaching->value() );
+ mrl += " :jack-input-caching=" + QString::number( jackCaching->value() );
if ( jackPace->isChecked() )
{
mrl += " :jack-input-use-vlc-pace";
@@ -1098,22 +1098,22 @@ void CaptureOpenPanel::updateMRL()
fileList << "pvr://";
mrl += " :pvr-device=" + pvrDevice->text();
mrl += " :pvr-radio-device=" + pvrRadioDevice->text();
- mrl += " :pvr-norm=" + QString("%1").arg( pvrNormBox->currentIndex() );
+ mrl += " :pvr-norm=" + QString::number( pvrNormBox->currentIndex() );
if( pvrFreq->value() )
- mrl += " :pvr-frequency=" + QString("%1").arg( pvrFreq->value() );
+ mrl += " :pvr-frequency=" + QString::number( pvrFreq->value() );
if( pvrBitr->value() )
- mrl += " :pvr-bitrate=" + QString("%1").arg( pvrBitr->value() );
+ mrl += " :pvr-bitrate=" + QString::number( pvrBitr->value() );
break;
case DVB_DEVICE:
fileList << "dvb://";
- mrl += " :dvb-adapter=" + QString("%1").arg( dvbCard->value() );
- mrl += " :dvb-frequency=" + QString("%1").arg( dvbFreq->value() );
- mrl += " :dvb-srate=" + QString("%1").arg( dvbSrate->value() );
+ mrl += " :dvb-adapter=" + QString::number( dvbCard->value() );
+ mrl += " :dvb-frequency=" + QString::number( dvbFreq->value() );
+ mrl += " :dvb-srate=" + QString::number( dvbSrate->value() );
break;
#endif
case SCREEN_DEVICE:
fileList << "screen://";
- mrl = " :screen-fps=" + QString("%1").arg( screenFPS->value() );
+ mrl = " :screen-fps=" + QString::number( screenFPS->value() );
updateButtons();
break;
}
More information about the vlc-devel
mailing list