[vlc-devel] commit: Qt: remove port from open network tab ( Rémi Denis-Courmont )
git version control
git at videolan.org
Wed Nov 25 21:38:09 CET 2009
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Nov 25 22:06:49 2009 +0200| [43925afd7a2ca0504632e578ab63731af8266895] | committer: Rémi Denis-Courmont
Qt: remove port from open network tab
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=43925afd7a2ca0504632e578ab63731af8266895
---
modules/gui/qt4/components/open_panels.cpp | 34 +---------------------------
modules/gui/qt4/ui/open_net.ui | 27 ----------------------
2 files changed, 1 insertions(+), 60 deletions(-)
diff --git a/modules/gui/qt4/components/open_panels.cpp b/modules/gui/qt4/components/open_panels.cpp
index 373f7e9..db28924 100644
--- a/modules/gui/qt4/components/open_panels.cpp
+++ b/modules/gui/qt4/components/open_panels.cpp
@@ -494,7 +494,6 @@ NetOpenPanel::NetOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
/* CONNECTs */
CONNECT( ui.protocolCombo, activated( int ),
this, updateProtocol( int ) );
- CONNECT( ui.portSpin, valueChanged( int ), this, updateMRL() );
CONNECT( ui.addressText, textChanged( const QString& ), this, updateMRL());
ui.protocolCombo->addItem( "" );
@@ -542,9 +541,6 @@ void NetOpenPanel::updateProtocol( int idx_proto ) {
QString addr = ui.addressText->text();
QString proto = ui.protocolCombo->itemData( idx_proto ).toString();
- ui.portSpin->setEnabled( idx_proto == UDP_PROTO ||
- idx_proto == RTP_PROTO );
-
if( idx_proto == NO_PROTO ) return;
/* If we already have a protocol in the address, replace it */
@@ -602,35 +598,7 @@ void NetOpenPanel::updateMRL() {
case UDP_PROTO:
mrl = qfu(((idx_proto == RTP_PROTO) ? "rtp" : "udp"));
mrl += qfu( "://" );
- if( addr[0] == ':' ) /* Port number without address */
- mrl += addr;
- else
- {
- if( !addr.contains( "@" ) )
- mrl += qfu( "@" );
- switch( addr.count( ":" ) )
- {
- case 0: /* DNS or IPv4 literal, no port number */
- mrl += addr;
- mrl += QString(":%1").arg( ui.portSpin->value() );
- break;
- case 1: /* DNS or IPv4 literal plus port number */
- mrl += addr;
- break;
- default: /* IPv6 literal */
- if( !addr.contains( "]:" ) )
- {
- if( addr[0] != '[' ) /* Missing brackets */
- mrl += qfu( "[" ) + addr + qfu( "]" );
- else
- mrl += addr;
- mrl += QString(":%1").arg( ui.portSpin->value() );
- }
- else /* Brackets present, port present */
- mrl += addr;
- break;
- }
- }
+ mrl += addr;
emit methodChanged(idx_proto == RTP_PROTO
? "rtp-caching" : "udp-caching");
break;
diff --git a/modules/gui/qt4/ui/open_net.ui b/modules/gui/qt4/ui/open_net.ui
index 6050e9b..af668b4 100644
--- a/modules/gui/qt4/ui/open_net.ui
+++ b/modules/gui/qt4/ui/open_net.ui
@@ -37,22 +37,6 @@
</property>
</widget>
</item>
- <item row="1" column="2" >
- <widget class="QSpinBox" name="portSpin" >
- <property name="toolTip" >
- <string>Select the port used</string>
- </property>
- <property name="accelerated" >
- <bool>true</bool>
- </property>
- <property name="maximum" >
- <number>65535</number>
- </property>
- <property name="value" >
- <number>1234</number>
- </property>
- </widget>
- </item>
<item row="0" column="1" >
<widget class="QLabel" name="label_2" >
<property name="sizePolicy" >
@@ -69,16 +53,6 @@
</property>
</widget>
</item>
- <item row="0" column="2" >
- <widget class="QLabel" name="label_4" >
- <property name="text" >
- <string>Port</string>
- </property>
- <property name="buddy" >
- <cstring>portSpin</cstring>
- </property>
- </widget>
- </item>
<item row="1" column="1" >
<widget class="QLineEdit" name="addressText" >
<property name="toolTip" >
@@ -110,7 +84,6 @@
<tabstops>
<tabstop>protocolCombo</tabstop>
<tabstop>addressText</tabstop>
- <tabstop>portSpin</tabstop>
</tabstops>
<resources/>
<connections/>
More information about the vlc-devel
mailing list