}
else
mrlList = NULL;
+
+ ui.urlText->setValidator( new UrlValidator( this ) );
}
NetOpenPanel::~NetOpenPanel()
mrlList->setStringList( tempL );
}
+void UrlValidator::fixup( QString& str ) const
+{
+ str = str.trimmed();
+}
+
+QValidator::State UrlValidator::validate( QString& str, int& pos ) const
+{
+ if( str.contains( ' ' ) )
+ return QValidator::Invalid;
+ if( !str.contains( "://" ) )
+ return QValidator::Intermediate;
+ return QValidator::Acceptable;
+}
+
/**************************************************************************
* Open Capture device ( DVB, PVR, V4L, and similar ) *
**************************************************************************/