diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-07-01 22:30:35 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-07-01 22:30:35 +0000 |
commit | ed6e59662040eb15573dae9c323450e9a720ac01 (patch) | |
tree | be17632b1c7c05f3d669eb26b5634edbcb772bb7 /smb4k/core/smb4kscanner.cpp | |
parent | c0875805b54444a0740d98a6d2c8fa05cd672fef (diff) | |
download | smb4k-ed6e59662040eb15573dae9c323450e9a720ac01.tar.gz smb4k-ed6e59662040eb15573dae9c323450e9a720ac01.zip |
TQt4 port smb4k
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/smb4k@1239034 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'smb4k/core/smb4kscanner.cpp')
-rw-r--r-- | smb4k/core/smb4kscanner.cpp | 362 |
1 files changed, 181 insertions, 181 deletions
diff --git a/smb4k/core/smb4kscanner.cpp b/smb4k/core/smb4kscanner.cpp index 737bf55..b4da920 100644 --- a/smb4k/core/smb4kscanner.cpp +++ b/smb4k/core/smb4kscanner.cpp @@ -23,10 +23,10 @@ * MA 02110-1301 USA * ***************************************************************************/ -// Qt includes -#include <qapplication.h> -#include <qmap.h> -#include <qdeepcopy.h> +// TQt includes +#include <tqapplication.h> +#include <tqmap.h> +#include <tqdeepcopy.h> // KDE includes #include <klocale.h> @@ -55,16 +55,16 @@ static bool created_hosts_list = false; -Smb4KScanner::Smb4KScanner( QValueList<Smb4KWorkgroupItem *> *workgroups, QValueList<Smb4KHostItem *> *hosts, -QObject *parent, const char *name ) -: QObject( parent, name ), m_workgroups_list( workgroups ), m_hosts_list( hosts ) +Smb4KScanner::Smb4KScanner( TQValueList<Smb4KWorkgroupItem *> *workgroups, TQValueList<Smb4KHostItem *> *hosts, +TQObject *tqparent, const char *name ) +: TQObject( tqparent, name ), m_workgroups_list( workgroups ), m_hosts_list( hosts ) { m_priv = new Smb4KScannerPrivate; if ( !m_workgroups_list ) { created_workgroups_list = true; - m_workgroups_list = new QValueList<Smb4KWorkgroupItem *>; + m_workgroups_list = new TQValueList<Smb4KWorkgroupItem *>; } else { @@ -74,7 +74,7 @@ QObject *parent, const char *name ) if ( !m_hosts_list ) { created_hosts_list = true; - m_hosts_list = new QValueList<Smb4KHostItem *>; + m_hosts_list = new TQValueList<Smb4KHostItem *>; } else { @@ -88,14 +88,14 @@ QObject *parent, const char *name ) m_queue.setAutoDelete( true ); - connect( m_proc, SIGNAL( receivedStdout( KProcess *, char *, int ) ), - this, SLOT( slotReceivedStdout( KProcess *, char *, int ) ) ); + connect( m_proc, TQT_SIGNAL( receivedStdout( KProcess *, char *, int ) ), + this, TQT_SLOT( slotReceivedStdout( KProcess *, char *, int ) ) ); - connect( m_proc, SIGNAL( processExited( KProcess* ) ), - this, SLOT( slotProcessExited( KProcess * ) ) ); + connect( m_proc, TQT_SIGNAL( processExited( KProcess* ) ), + this, TQT_SLOT( slotProcessExited( KProcess * ) ) ); - connect( m_proc, SIGNAL( receivedStderr( KProcess *, char *, int ) ), - this, SLOT( slotReceivedStderr( KProcess *, char *, int ) ) ); + connect( m_proc, TQT_SIGNAL( receivedStderr( KProcess *, char *, int ) ), + this, TQT_SLOT( slotReceivedStderr( KProcess *, char *, int ) ) ); } @@ -106,7 +106,7 @@ Smb4KScanner::~Smb4KScanner() // Delete the list of workgroups, if necessary: if ( created_workgroups_list ) { - for ( QValueList<Smb4KWorkgroupItem *>::Iterator it = m_workgroups_list->begin(); it != m_workgroups_list->end(); ++it ) + for ( TQValueList<Smb4KWorkgroupItem *>::Iterator it = m_workgroups_list->begin(); it != m_workgroups_list->end(); ++it ) { delete *it; } @@ -123,7 +123,7 @@ Smb4KScanner::~Smb4KScanner() // Delete the list of hosts, if necessary: if ( created_hosts_list ) { - for ( QValueList<Smb4KHostItem *>::Iterator it = m_hosts_list->begin(); it != m_hosts_list->end(); ++it ) + for ( TQValueList<Smb4KHostItem *>::Iterator it = m_hosts_list->begin(); it != m_hosts_list->end(); ++it ) { delete *it; } @@ -150,7 +150,7 @@ void Smb4KScanner::init() void Smb4KScanner::rescan() { - m_queue.enqueue( new QString( QString( "%1:" ).arg( Init ) ) ); + m_queue.enqueue( new TQString( TQString( "%1:" ).tqarg( Init ) ) ); } @@ -158,9 +158,9 @@ void Smb4KScanner::rescan() Scans for workgroup members. (public part) ****************************************************************************/ -void Smb4KScanner::getWorkgroupMembers( const QString &workgroup, const QString &master, const QString &ip ) +void Smb4KScanner::getWorkgroupMembers( const TQString &workgroup, const TQString &master, const TQString &ip ) { - m_queue.enqueue( new QString( QString( "%1:%2:%3:%4" ).arg( Hosts ).arg( workgroup, master, ip ) ) ); + m_queue.enqueue( new TQString( TQString( "%1:%2:%3:%4" ).tqarg( Hosts ).tqarg( workgroup, master, ip ) ) ); } @@ -168,9 +168,9 @@ void Smb4KScanner::getWorkgroupMembers( const QString &workgroup, const QString Scans for shares on a selected host. (public part) ****************************************************************************/ -void Smb4KScanner::getShares( const QString &workgroup, const QString &host, const QString &ip, const QString &protocol ) +void Smb4KScanner::getShares( const TQString &workgroup, const TQString &host, const TQString &ip, const TQString &protocol ) { - m_queue.enqueue( new QString( QString( "%1:%2:%3:%4:%5" ).arg( Shares ).arg( workgroup, host, ip ).arg( protocol ) ) ); + m_queue.enqueue( new TQString( TQString( "%1:%2:%3:%4:%5" ).tqarg( Shares ).tqarg( workgroup, host, ip ).tqarg( protocol ) ) ); } @@ -178,7 +178,7 @@ void Smb4KScanner::getShares( const QString &workgroup, const QString &host, con Gets more info on a selected host. (public part) ****************************************************************************/ -void Smb4KScanner::getInfo( const QString &workgroup, const QString &host, const QString &ip ) +void Smb4KScanner::getInfo( const TQString &workgroup, const TQString &host, const TQString &ip ) { Smb4KHostItem *item = getHost( host, workgroup ); @@ -194,7 +194,7 @@ void Smb4KScanner::getInfo( const QString &workgroup, const QString &host, const item->setInfoChecked( true ); } - m_queue.enqueue( new QString( QString( "%1:%2:%3:%4" ).arg( Info ).arg( workgroup, host, ip ) ) ); + m_queue.enqueue( new TQString( TQString( "%1:%2:%3:%4" ).tqarg( Info ).tqarg( workgroup, host, ip ) ) ); } @@ -202,7 +202,7 @@ void Smb4KScanner::getInfo( const QString &workgroup, const QString &host, const Searches for a host. (public part) ****************************************************************************/ -void Smb4KScanner::search( const QString &host ) +void Smb4KScanner::search( const TQString &host ) { // Check whether we already have this host in // the list: @@ -215,7 +215,7 @@ void Smb4KScanner::search( const QString &host ) return; } - m_queue.enqueue( new QString( QString( "%1:%2" ).arg( Search ).arg( host ) ) ); + m_queue.enqueue( new TQString( TQString( "%1:%2" ).tqarg( Search ).tqarg( host ) ) ); } @@ -242,12 +242,12 @@ void Smb4KScanner::scanNetwork() { abort(); - QString command; + TQString command; // Look up the workgroups/domains and their master browsers. // At the moment we have three methods: // (1) Smb4KSettings::EnumBrowseList::LookupDomains: This method is - // the most reliable one. It uses nmblookup and will only find + // the most reliable one. It uses nmblookup and will only tqfind // *active* workgroup master browsers and thus active domains. // (2) Smb4KSettings::EnumBrowseList::QueryCurrentMaster: This // method will query the current master browser of the local @@ -268,7 +268,7 @@ void Smb4KScanner::scanNetwork() command.append( optionsHandler()->nmblookupOptions() ); command.append( " -- - | grep '<01>' | awk '{print $1}'" ); command.append( !optionsHandler()->winsServer().isEmpty() ? - QString( " | xargs nmblookup -R -U %1 -A " ).arg( optionsHandler()->winsServer() ) : + TQString( " | xargs nmblookup -R -U %1 -A " ).tqarg( optionsHandler()->winsServer() ) : " | xargs nmblookup -A " ); command.append( optionsHandler()->nmblookupOptions() ); @@ -285,7 +285,7 @@ void Smb4KScanner::scanNetwork() Smb4KSettings::domainName() ) ); command.append( " -U % | xargs net " ); command.append( optionsHandler()->netOptions( Smb4KSambaOptionsHandler::Domain, - QString::null ) ); + TQString() ) ); command.append( " -U % -S" ); *m_proc << command; @@ -302,7 +302,7 @@ void Smb4KScanner::scanNetwork() command.append( " -U % -S "+KProcess::quote( Smb4KSettings::customMasterBrowser() ) ); command.append( " | xargs net " ); command.append( optionsHandler()->netOptions( Smb4KSambaOptionsHandler::Domain, - QString::null ) ); + TQString() ) ); command.append( " -U % -S "+KProcess::quote( Smb4KSettings::customMasterBrowser() )+" -I " ); *m_proc << command; @@ -314,10 +314,10 @@ void Smb4KScanner::scanNetwork() case Smb4KSettings::EnumBrowseList::ScanBroadcastAreas: { // Get the broadcast addresses that are to be scanned: - QStringList addresses = QStringList::split( ",", Smb4KSettings::broadcastAreas(), false ); + TQStringList addresses = TQStringList::split( ",", Smb4KSettings::broadcastAreas(), false ); // Build the command: - for ( QStringList::ConstIterator it = addresses.begin(); it != addresses.end(); ++it ) + for ( TQStringList::ConstIterator it = addresses.begin(); it != addresses.end(); ++it ) { if ( !(*it).isEmpty() ) { @@ -366,27 +366,27 @@ void Smb4KScanner::scanNetwork() Scans for workgroup members. (private part) ****************************************************************************/ -void Smb4KScanner::scanForWorkgroupMembers( const QString &workgroup, const QString &master, const QString &ip ) +void Smb4KScanner::scanForWorkgroupMembers( const TQString &workgroup, const TQString &master, const TQString &ip ) { m_priv->setWorkgroup( workgroup ); m_priv->setHost( master ); m_priv->setIP( ip ); - QString command; + TQString command; if ( !ip.isEmpty() ) { - command.append( "net "+optionsHandler()->netOptions( Smb4KSambaOptionsHandler::ServerDomain, QString::null ) ); + command.append( "net "+optionsHandler()->netOptions( Smb4KSambaOptionsHandler::ServerDomain, TQString() ) ); command.append( " -I "+ip ); command.append( " -w "+KProcess::quote( workgroup ) ); command.append( " -S "+KProcess::quote( master ) ); - Smb4KAuthInfo authInfo( workgroup, master, QString::null ); + Smb4KAuthInfo authInfo( workgroup, master, TQString() ); (void) passwordHandler()->readAuth( &authInfo ); if ( !authInfo.user().isEmpty() ) { - command.append( QString( " -U %1" ).arg( KProcess::quote( authInfo.user() ) ) ); + command.append( TQString( " -U %1" ).tqarg( KProcess::quote( authInfo.user() ) ) ); if ( !authInfo.password().isEmpty() ) { @@ -407,17 +407,17 @@ void Smb4KScanner::scanForWorkgroupMembers( const QString &workgroup, const QStr command.append( "| xargs -IIPADDR " ); command.append( getenv( "SHELL" ) ); command.append( " -c 'echo \"*** "+master+": IPADDR ***\" && " ); - command.append( "net "+optionsHandler()->netOptions( Smb4KSambaOptionsHandler::ServerDomain, QString::null ) ); + command.append( "net "+optionsHandler()->netOptions( Smb4KSambaOptionsHandler::ServerDomain, TQString() ) ); command.append( " -I IPADDR" ); command.append( " -w "+KProcess::quote( workgroup ) ); command.append( " -S "+KProcess::quote( master ) ); - Smb4KAuthInfo authInfo( workgroup, master, QString::null ); + Smb4KAuthInfo authInfo( workgroup, master, TQString() ); (void) passwordHandler()->readAuth( &authInfo ); if ( !authInfo.user().isEmpty() ) { - command.append( QString( " -U %1'" ).arg( KProcess::quote( authInfo.user() ) ) ); + command.append( TQString( " -U %1'" ).tqarg( KProcess::quote( authInfo.user() ) ) ); if ( !authInfo.password().isEmpty() ) { @@ -440,26 +440,26 @@ void Smb4KScanner::scanForWorkgroupMembers( const QString &workgroup, const QStr Scans for shares on a selected host. (private part) ****************************************************************************/ -void Smb4KScanner::scanForShares( const QString &workgroup, const QString &host, const QString &ip, const QString &protocol ) +void Smb4KScanner::scanForShares( const TQString &workgroup, const TQString &host, const TQString &ip, const TQString &protocol ) { m_priv->setWorkgroup( workgroup ); m_priv->setHost( host ); m_priv->setIP( ip ); - Smb4KAuthInfo *auth = passwordHandler()->readAuth( new Smb4KAuthInfo( workgroup, host, QString::null ) ); + Smb4KAuthInfo *auth = passwordHandler()->readAuth( new Smb4KAuthInfo( workgroup, host, TQString() ) ); - QString command; + TQString command; - command = QString( "net %1 -w %2 -S %3" ).arg( optionsHandler()->netOptions( Smb4KSambaOptionsHandler::Share, host, protocol ) ).arg( KProcess::quote( workgroup ), KProcess::quote( host ) ); + command = TQString( "net %1 -w %2 -S %3" ).tqarg( optionsHandler()->netOptions( Smb4KSambaOptionsHandler::Share, host, protocol ) ).tqarg( KProcess::quote( workgroup ), KProcess::quote( host ) ); if ( !ip.isEmpty() ) { - command.append( QString( " -I %1" ).arg( KProcess::quote( ip ) ) ); + command.append( TQString( " -I %1" ).tqarg( KProcess::quote( ip ) ) ); } if ( !auth->user().isEmpty() ) { - command.append( QString( " -U %1" ).arg( KProcess::quote( auth->user() ) ) ); + command.append( TQString( " -U %1" ).tqarg( KProcess::quote( auth->user() ) ) ); if ( !auth->password().isEmpty() ) { @@ -483,19 +483,19 @@ void Smb4KScanner::scanForShares( const QString &workgroup, const QString &host, Gets more info on a selected host. (private part) ****************************************************************************/ -void Smb4KScanner::scanForInfo( const QString &workgroup, const QString &host, const QString &ip ) +void Smb4KScanner::scanForInfo( const TQString &workgroup, const TQString &host, const TQString &ip ) { m_priv->setWorkgroup( workgroup ); m_priv->setHost( host ); m_priv->setIP( ip ); - QString smbclient_options = optionsHandler()->smbclientOptions(); + TQString smbclient_options = optionsHandler()->smbclientOptions(); - QString command = QString( "smbclient -d1 -U guest% -W %1 -L %2" ).arg( KProcess::quote( workgroup ) ).arg( KProcess::quote( host ) ); + TQString command = TQString( "smbclient -d1 -U guest% -W %1 -L %2" ).tqarg( KProcess::quote( workgroup ) ).tqarg( KProcess::quote( host ) ); if ( !ip.isEmpty() ) { - command.append( QString( " -I %1" ).arg( KProcess::quote( ip ) ) ); + command.append( TQString( " -I %1" ).tqarg( KProcess::quote( ip ) ) ); } if ( !smbclient_options.stripWhiteSpace().isEmpty() ) @@ -513,7 +513,7 @@ void Smb4KScanner::scanForInfo( const QString &workgroup, const QString &host, c Searches for a host. (private part) ****************************************************************************/ -void Smb4KScanner::searchForHost( const QString &host ) +void Smb4KScanner::searchForHost( const TQString &host ) { // We need this because smbclient won't return the host name. KNetwork::KIpAddress ip_address = KNetwork::KIpAddress( host ); @@ -529,43 +529,43 @@ void Smb4KScanner::searchForHost( const QString &host ) m_priv->setHost( host ); - QString wins = optionsHandler()->winsServer(); - QString nmblookup_options = optionsHandler()->nmblookupOptions(); - QString smbclient_options = optionsHandler()->smbclientOptions(); + TQString wins = optionsHandler()->winsServer(); + TQString nmblookup_options = optionsHandler()->nmblookupOptions(); + TQString smbclient_options = optionsHandler()->smbclientOptions(); - QString command; + TQString command; switch ( Smb4KSettings::searchMethod() ) { case Smb4KSettings::EnumSearchMethod::Nmblookup: { - command = QString( "nmblookup" ); + command = TQString( "nmblookup" ); if ( !nmblookup_options.stripWhiteSpace().isEmpty() ) { command.append( nmblookup_options ); } - if ( host.contains( '.', true ) != 3 ) + if ( host.tqcontains( '.', true ) != 3 ) { if ( !wins.isEmpty() ) { - command.append( QString( " -R -U %1 %2 -S | grep '<00>' | sed -e 's/<00>.*//'" ).arg( wins ).arg( m_priv->host() ) ); + command.append( TQString( " -R -U %1 %2 -S | grep '<00>' | sed -e 's/<00>.*//'" ).tqarg( wins ).tqarg( m_priv->host() ) ); } else { - command.append( QString( " %1 -S | grep '<00>' | sed -e 's/<00>.*//'" ).arg( m_priv->host() ) ); + command.append( TQString( " %1 -S | grep '<00>' | sed -e 's/<00>.*//'" ).tqarg( m_priv->host() ) ); } } else { if ( !wins.isEmpty() ) { - command.append( QString( " -R -U %1 %2 -A | grep '<00>' | sed -e 's/<00>.*//'" ).arg( wins ).arg( m_priv->host() ) ); + command.append( TQString( " -R -U %1 %2 -A | grep '<00>' | sed -e 's/<00>.*//'" ).tqarg( wins ).tqarg( m_priv->host() ) ); } else { - command.append( QString( " %1 -A | grep '<00>' | sed -e 's/<00>.*//'" ).arg( m_priv->host() ) ); + command.append( TQString( " %1 -A | grep '<00>' | sed -e 's/<00>.*//'" ).tqarg( m_priv->host() ) ); } } @@ -573,7 +573,7 @@ void Smb4KScanner::searchForHost( const QString &host ) } case Smb4KSettings::EnumSearchMethod::Smbclient: { - command = QString( "smbclient -d2 -U % -L %1" ).arg( m_priv->host() ); + command = TQString( "smbclient -d2 -U % -L %1" ).tqarg( m_priv->host() ); if ( !smbclient_options.stripWhiteSpace().isEmpty() ) { @@ -602,11 +602,11 @@ void Smb4KScanner::searchForHost( const QString &host ) void Smb4KScanner::startProcess( int state ) { m_state = state; - m_buffer = QString::null; + m_buffer = TQString(); if ( state != Info ) { - QApplication::setOverrideCursor( waitCursor ); + TQApplication::setOverrideCursor( waitCursor ); } m_proc->start( KProcess::NotifyOnExit, KProcess::AllOutput ); @@ -648,7 +648,7 @@ void Smb4KScanner::endProcess() m_priv->clearData(); - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); m_proc->clearArguments(); @@ -664,14 +664,14 @@ void Smb4KScanner::endProcess() void Smb4KScanner::processWorkgroups() { - QStringList list = QStringList::split( '\n', m_buffer, false ); + TQStringList list = TQStringList::split( '\n', m_buffer, false ); - for ( QValueList<Smb4KWorkgroupItem *>::Iterator it = m_workgroups_list->begin(); it != m_workgroups_list->end(); ++it ) + for ( TQValueList<Smb4KWorkgroupItem *>::Iterator it = m_workgroups_list->begin(); it != m_workgroups_list->end(); ++it ) { delete *it; } - for ( QValueList<Smb4KHostItem *>::Iterator it = m_hosts_list->begin(); it != m_hosts_list->end(); ++it ) + for ( TQValueList<Smb4KHostItem *>::Iterator it = m_hosts_list->begin(); it != m_hosts_list->end(); ++it ) { delete *it; } @@ -681,9 +681,9 @@ void Smb4KScanner::processWorkgroups() if ( m_state == Workgroups ) { - QString workgroup, master, ip; + TQString workgroup, master, ip; - for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it ) + for ( TQStringList::Iterator it = list.begin(); it != list.end(); ++it ) { if ( (*it).stripWhiteSpace().startsWith( "Looking" ) ) { @@ -691,7 +691,7 @@ void Smb4KScanner::processWorkgroups() continue; } - else if ( (*it).contains( "<00>" ) != 0 && (*it).contains( "<GROUP>" ) == 0 ) + else if ( (*it).tqcontains( "<00>" ) != 0 && (*it).tqcontains( "<GROUP>" ) == 0 ) { if ( workgroup.isEmpty() && master.isEmpty() && !ip.isEmpty() ) { @@ -700,22 +700,22 @@ void Smb4KScanner::processWorkgroups() continue; } - else if ( (*it).contains( "<00>" ) != 0 && (*it).contains( "<GROUP>" ) != 0 ) + else if ( (*it).tqcontains( "<00>" ) != 0 && (*it).tqcontains( "<GROUP>" ) != 0 ) { if ( workgroup.isEmpty() && !master.isEmpty() && !ip.isEmpty() ) { - workgroup = (*it).left( (*it).find( "<00>" ) ).stripWhiteSpace(); + workgroup = (*it).left( (*it).tqfind( "<00>" ) ).stripWhiteSpace(); m_workgroups_list->append( new Smb4KWorkgroupItem( workgroup, master, ip ) ); - Smb4KHostItem *master_item = new Smb4KHostItem( workgroup, master, QString::null, ip ); + Smb4KHostItem *master_item = new Smb4KHostItem( workgroup, master, TQString(), ip ); master_item->setMaster( true ); m_hosts_list->append( master_item ); - workgroup = QString::null; - master = QString::null; - ip = QString::null; + workgroup = TQString(); + master = TQString(); + ip = TQString(); } continue; @@ -726,9 +726,9 @@ void Smb4KScanner::processWorkgroups() { bool process = false; - for ( QStringList::ConstIterator it = list.begin(); it != list.end(); ++it ) + for ( TQStringList::ConstIterator it = list.begin(); it != list.end(); ++it ) { - QString line = (*it).stripWhiteSpace(); + TQString line = (*it).stripWhiteSpace(); if ( line.startsWith( "-------------" ) ) { @@ -739,10 +739,10 @@ void Smb4KScanner::processWorkgroups() if ( process && !line.isEmpty() ) { - QString workgroup = line.section( " ", 0, 0 ).stripWhiteSpace(); - QString master = line.section( " ", 1, -1 ).stripWhiteSpace(); + TQString workgroup = line.section( " ", 0, 0 ).stripWhiteSpace(); + TQString master = line.section( " ", 1, -1 ).stripWhiteSpace(); - m_workgroups_list->append( new Smb4KWorkgroupItem( workgroup, master, QString::null ) ); + m_workgroups_list->append( new Smb4KWorkgroupItem( workgroup, master, TQString() ) ); Smb4KHostItem *master_item = new Smb4KHostItem( workgroup, master ); master_item->setMaster( true ); @@ -771,14 +771,14 @@ void Smb4KScanner::processWorkgroups() void Smb4KScanner::processIPScan() { - QStringList list = QStringList::split( '\n', m_buffer, true ); + TQStringList list = TQStringList::split( '\n', m_buffer, true ); - for ( QValueList<Smb4KWorkgroupItem *>::Iterator it = m_workgroups_list->begin(); it != m_workgroups_list->end(); ++it ) + for ( TQValueList<Smb4KWorkgroupItem *>::Iterator it = m_workgroups_list->begin(); it != m_workgroups_list->end(); ++it ) { delete *it; } - for ( QValueList<Smb4KHostItem *>::Iterator it = m_hosts_list->begin(); it != m_hosts_list->end(); ++it ) + for ( TQValueList<Smb4KHostItem *>::Iterator it = m_hosts_list->begin(); it != m_hosts_list->end(); ++it ) { delete *it; } @@ -787,22 +787,22 @@ void Smb4KScanner::processIPScan() m_hosts_list->clear(); // Process the data: - for ( QStringList::ConstIterator it = list.begin(); it != list.end(); ++it ) + for ( TQStringList::ConstIterator it = list.begin(); it != list.end(); ++it ) { if ( (*it).startsWith( "Looking up status of" ) ) { - QString workgroup, host, ip; + TQString workgroup, host, ip; bool master = false; // Get the IP address of this host. ip = (*it).section( "of", 1, 1 ).stripWhiteSpace(); // Loop through the data: - for ( QStringList::ConstIterator i = it; i != list.end(); ++i ) + for ( TQStringList::ConstIterator i = it; i != list.end(); ++i ) { - if ( (*i).contains( " <00> " ) != 0 ) + if ( (*i).tqcontains( " <00> " ) != 0 ) { - if ( (*i).contains( " <GROUP> " ) != 0 ) + if ( (*i).tqcontains( " <GROUP> " ) != 0 ) { workgroup = (*i).section( "<00>", 0, 0 ).stripWhiteSpace(); } @@ -813,13 +813,13 @@ void Smb4KScanner::processIPScan() continue; } - else if ( (*i).contains( "__MSBROWSE__" ) != 0 && (*i).contains( " <01> " ) != 0 ) + else if ( (*i).tqcontains( "__MSBROWSE__" ) != 0 && (*i).tqcontains( " <01> " ) != 0 ) { master = true; continue; } - else if ( (*i).contains( "MAC Address" ) != 0 || (*i).stripWhiteSpace().isEmpty() ) + else if ( (*i).tqcontains( "MAC Address" ) != 0 || (*i).stripWhiteSpace().isEmpty() ) { it = i; @@ -854,11 +854,11 @@ void Smb4KScanner::processIPScan() } else { - m_workgroups_list->append( new Smb4KWorkgroupItem( workgroup, QString::null, QString::null ) ); + m_workgroups_list->append( new Smb4KWorkgroupItem( workgroup, TQString(), TQString() ) ); } } - Smb4KHostItem *host_item = new Smb4KHostItem( workgroup, host, QString::null, ip ); + Smb4KHostItem *host_item = new Smb4KHostItem( workgroup, host, TQString(), ip ); host_item->setMaster( master ); m_hosts_list->append( host_item ); @@ -889,7 +889,7 @@ void Smb4KScanner::processIPScan() void Smb4KScanner::processWorkgroupMembers() { - QStringList list = QStringList::split( '\n', m_buffer, false ); + TQStringList list = TQStringList::split( '\n', m_buffer, false ); switch ( Smb4KSettings::browseList() ) { @@ -897,27 +897,27 @@ void Smb4KScanner::processWorkgroupMembers() case Smb4KSettings::EnumBrowseList::QueryCurrentMaster: case Smb4KSettings::EnumBrowseList::QueryCustomMaster: { - if ( m_buffer.contains( "NT_STATUS_ACCESS_DENIED" ) != 0 || - m_buffer.contains( "NT_STATUS_LOGON_FAILURE" ) != 0 || - m_buffer.contains( "The username or password was not correct" ) != 0 ) + if ( m_buffer.tqcontains( "NT_STATUS_ACCESS_DENIED" ) != 0 || + m_buffer.tqcontains( "NT_STATUS_LOGON_FAILURE" ) != 0 || + m_buffer.tqcontains( "The username or password was not correct" ) != 0 ) { // Authentication failed: emit failed(); if ( passwordHandler()->askpass( m_priv->workgroup(), m_priv->host(), - QString::null, Smb4KPasswordHandler::AccessDenied, + TQString(), Smb4KPasswordHandler::AccessDenied, kapp->mainWidget() ? kapp->mainWidget() : 0, "AskPass" ) ) { - m_queue.enqueue( new QString( QString( "%1:%2:%3:%4" ).arg( Hosts ).arg( m_priv->workgroup(), m_priv->host(), m_priv->ip() ) ) ); + m_queue.enqueue( new TQString( TQString( "%1:%2:%3:%4" ).tqarg( Hosts ).tqarg( m_priv->workgroup(), m_priv->host(), m_priv->ip() ) ) ); } return; } - else if ( m_buffer.contains( "Could not connect to server" ) != 0 || - m_buffer.contains( "Unable to find a suitable server" ) != 0 || - m_buffer.contains( "Invalid ip address specified" ) != 0 ) + else if ( m_buffer.tqcontains( "Could not connect to server" ) != 0 || + m_buffer.tqcontains( "Unable to find a suitable server" ) != 0 || + m_buffer.tqcontains( "Invalid ip address specified" ) != 0 ) { - // If the IP address is empty, the shell output contains + // If the IP address is empty, the shell output tqcontains // the IP address. Remove it, because it will confuse // the user: if ( m_priv->ip().isEmpty() ) @@ -929,7 +929,7 @@ void Smb4KScanner::processWorkgroupMembers() emit failed(); // Notify the user: - Smb4KError::error( ERROR_GETTING_MEMBERS, QString::null, list.join( "\n" ) ); + Smb4KError::error( ERROR_GETTING_MEMBERS, TQString(), list.join( "\n" ) ); return; } @@ -938,13 +938,13 @@ void Smb4KScanner::processWorkgroupMembers() // Do nothing } - QValueList<Smb4KHostItem *> hosts; + TQValueList<Smb4KHostItem *> hosts; bool process = false; - for ( QStringList::ConstIterator it = list.begin(); it != list.end(); ++it ) + for ( TQStringList::ConstIterator it = list.begin(); it != list.end(); ++it ) { - QString line = (*it).stripWhiteSpace(); + TQString line = (*it).stripWhiteSpace(); if ( !process ) { @@ -972,9 +972,9 @@ void Smb4KScanner::processWorkgroupMembers() { if ( !line.isEmpty() ) { - QString host, comment; + TQString host, comment; - if ( line.contains( " " ) == 0 ) + if ( line.tqcontains( " " ) == 0 ) { host = line; } @@ -986,7 +986,7 @@ void Smb4KScanner::processWorkgroupMembers() Smb4KHostItem *item = new Smb4KHostItem( m_priv->workgroup(), host, comment ); - if ( QString::compare( item->name(), m_priv->host() ) == 0 ) + if ( TQString::compare( item->name(), m_priv->host() ) == 0 ) { // The item is identical to the master browser! Give the // respective workgroup item the IP address of the master @@ -1028,15 +1028,15 @@ void Smb4KScanner::processWorkgroupMembers() emit members( m_priv->workgroup(), hosts ); // Now put the hosts in m_hosts_list: - for ( QValueList<Smb4KHostItem *>::Iterator it = m_hosts_list->begin(); it != m_hosts_list->end(); ++it ) + for ( TQValueList<Smb4KHostItem *>::Iterator it = m_hosts_list->begin(); it != m_hosts_list->end(); ++it ) { - if ( QString::compare( (*it)->workgroup(), m_priv->workgroup() ) == 0 ) + if ( TQString::compare( (*it)->workgroup(), m_priv->workgroup() ) == 0 ) { bool found = false; - for ( QValueList<Smb4KHostItem *>::Iterator i = hosts.begin(); i != hosts.end(); ++i ) + for ( TQValueList<Smb4KHostItem *>::Iterator i = hosts.begin(); i != hosts.end(); ++i ) { - if ( *i && QString::compare( (*i)->name(), (*it)->name() ) == 0 ) + if ( *i && TQString::compare( (*i)->name(), (*it)->name() ) == 0 ) { found = true; @@ -1079,25 +1079,25 @@ void Smb4KScanner::processWorkgroupMembers() } case Smb4KSettings::EnumBrowseList::ScanBroadcastAreas: { - if ( m_buffer.contains( "NT_STATUS_ACCESS_DENIED" ) != 0 || - m_buffer.contains( "NT_STATUS_LOGON_FAILURE" ) != 0 || - m_buffer.contains( "The username or password was not correct" ) != 0 ) + if ( m_buffer.tqcontains( "NT_STATUS_ACCESS_DENIED" ) != 0 || + m_buffer.tqcontains( "NT_STATUS_LOGON_FAILURE" ) != 0 || + m_buffer.tqcontains( "The username or password was not correct" ) != 0 ) { // Authentication failed: emit failed(); if ( passwordHandler()->askpass( m_priv->workgroup(), m_priv->host(), - QString::null, Smb4KPasswordHandler::AccessDenied, + TQString(), Smb4KPasswordHandler::AccessDenied, kapp->mainWidget() ? kapp->mainWidget() : 0, "AskPass" ) ) { - m_queue.enqueue( new QString( QString( "%1:%2:%3:%4" ).arg( Hosts ).arg( m_priv->workgroup(), m_priv->host(), m_priv->ip() ) ) ); + m_queue.enqueue( new TQString( TQString( "%1:%2:%3:%4" ).tqarg( Hosts ).tqarg( m_priv->workgroup(), m_priv->host(), m_priv->ip() ) ) ); } return; } - else if ( m_buffer.contains( "Could not connect to server" ) != 0 || - m_buffer.contains( "Unable to find a suitable server" ) != 0 || - m_buffer.contains( "Invalid ip address specified" ) != 0 ) + else if ( m_buffer.tqcontains( "Could not connect to server" ) != 0 || + m_buffer.tqcontains( "Unable to find a suitable server" ) != 0 || + m_buffer.tqcontains( "Invalid ip address specified" ) != 0 ) { // We are in IP scan mode, so we can ignore the error and emit // what we already have: @@ -1112,7 +1112,7 @@ void Smb4KScanner::processWorkgroupMembers() bool process = false; - for ( QStringList::ConstIterator it = list.begin(); it != list.end(); ++it ) + for ( TQStringList::ConstIterator it = list.begin(); it != list.end(); ++it ) { if ( (*it).stripWhiteSpace().startsWith( "-------------" ) ) { @@ -1123,12 +1123,12 @@ void Smb4KScanner::processWorkgroupMembers() if ( process && !(*it).stripWhiteSpace().isEmpty() ) { - QString line = (*it).stripWhiteSpace(); + TQString line = (*it).stripWhiteSpace(); // Extract host name and comment: - QString host, comment; + TQString host, comment; - if ( line.contains( " " ) == 0 ) + if ( line.tqcontains( " " ) == 0 ) { host = line; } @@ -1179,49 +1179,49 @@ void Smb4KScanner::processWorkgroupMembers() void Smb4KScanner::processShares() { // Error handling - if ( m_buffer.contains( "The username or password was not correct.", true ) != 0 || - m_buffer.contains( "NT_STATUS_ACCOUNT_DISABLED" ) != 0 /* Active Directory error */ ) + if ( m_buffer.tqcontains( "The username or password was not correct.", true ) != 0 || + m_buffer.tqcontains( "NT_STATUS_ACCOUNT_DISABLED" ) != 0 /* Active Directory error */ ) { // Authentication failed: emit failed(); - if ( passwordHandler()->askpass( m_priv->workgroup(), m_priv->host(), QString::null, Smb4KPasswordHandler::AccessDenied, kapp->mainWidget() ? kapp->mainWidget() : 0, "AskPass" ) ) + if ( passwordHandler()->askpass( m_priv->workgroup(), m_priv->host(), TQString(), Smb4KPasswordHandler::AccessDenied, kapp->mainWidget() ? kapp->mainWidget() : 0, "AskPass" ) ) { - m_queue.enqueue( new QString( QString( "%1:%2:%3:%4:%5" ).arg( Shares ).arg( m_priv->workgroup(), m_priv->host(), m_priv->ip(), QString::null ) ) ); + m_queue.enqueue( new TQString( TQString( "%1:%2:%3:%4:%5" ).tqarg( Shares ).tqarg( m_priv->workgroup(), m_priv->host(), m_priv->ip(), TQString() ) ) ); } return; } - else if ( m_buffer.contains( "could not obtain sid for domain", true ) != 0 ) + else if ( m_buffer.tqcontains( "could not obtain sid for domain", true ) != 0 ) { // FIXME: Does this error only occur when we scan a server that is // only capable of the RAP protocol or also under other conditions? - m_queue.enqueue( new QString( QString( "%1:%2:%3:%4:%5" ).arg( Shares ).arg( m_priv->workgroup(), m_priv->host(), m_priv->ip(), "rap" ) ) ); + m_queue.enqueue( new TQString( TQString( "%1:%2:%3:%4:%5" ).tqarg( Shares ).tqarg( m_priv->workgroup(), m_priv->host(), m_priv->ip(), "rap" ) ) ); m_priv->retry = true; return; } - else if ( (m_buffer.contains( "Could not connect to server", true ) != 0 && - m_buffer.contains( "The username or password was not correct.", true ) == 0) || - m_buffer.contains( "Unable to find a suitable server" ) != 0 ) + else if ( (m_buffer.tqcontains( "Could not connect to server", true ) != 0 && + m_buffer.tqcontains( "The username or password was not correct.", true ) == 0) || + m_buffer.tqcontains( "Unable to find a suitable server" ) != 0 ) { // We could not get the list of shares: emit failed(); // Notify the user: - Smb4KError::error( ERROR_GETTING_SHARES, QString::null, m_buffer ); + Smb4KError::error( ERROR_GETTING_SHARES, TQString(), m_buffer ); return; } - QStringList list = QStringList::split( '\n', m_buffer, false ); + TQStringList list = TQStringList::split( '\n', m_buffer, false ); - QValueList<Smb4KShareItem *> share_list; + TQValueList<Smb4KShareItem *> share_list; bool process = false; - for ( QStringList::ConstIterator it = list.begin(); it != list.end(); ++it ) + for ( TQStringList::ConstIterator it = list.begin(); it != list.end(); ++it ) { if ( (*it).startsWith( "---" ) ) { @@ -1230,21 +1230,21 @@ void Smb4KScanner::processShares() if ( process ) { - QString name, type, comment; + TQString name, type, comment; - if ( (*it).contains( " Disk ", true ) != 0 ) + if ( (*it).tqcontains( " Disk ", true ) != 0 ) { name = (*it).section( " Disk ", 0, 0 ).stripWhiteSpace(); type = "Disk"; comment = (*it).section( " Disk ", 1, 1 ).stripWhiteSpace(); } - else if ( (*it).contains( " Print ", true ) != 0 ) + else if ( (*it).tqcontains( " Print ", true ) != 0 ) { name = (*it).section( " Print ", 0, 0 ).stripWhiteSpace(); type = "Printer"; comment = (*it).section( " Print ", 1, 1 ).stripWhiteSpace(); } - else if ( (*it).contains( " IPC ", true ) != 0 ) + else if ( (*it).tqcontains( " IPC ", true ) != 0 ) { name = (*it).section( " IPC ", 0, 0 ).stripWhiteSpace(); type = "IPC"; @@ -1278,15 +1278,15 @@ void Smb4KScanner::processSearch() // Stop right here if the user searched for illegal // strings like #, ', () etc. - if ( m_buffer.contains( "Usage:", true ) != 0 || - m_buffer.contains( "/bin/sh:", true ) != 0 ) + if ( m_buffer.tqcontains( "Usage:", true ) != 0 || + m_buffer.tqcontains( "/bin/sh:", true ) != 0 ) { emit searchResult( new Smb4KHostItem() ); return; } - QStringList data = QStringList::split( '\n', m_buffer.stripWhiteSpace(), false ); + TQStringList data = TQStringList::split( '\n', m_buffer.stripWhiteSpace(), false ); switch ( Smb4KSettings::searchMethod() ) { @@ -1295,10 +1295,10 @@ void Smb4KScanner::processSearch() if ( !data.isEmpty() ) { // The last entry in the list is the workgroup: - QString workgroup = data.last().stripWhiteSpace(); - QString host, ip; + TQString workgroup = data.last().stripWhiteSpace(); + TQString host, ip; - if ( m_priv->host().contains( ".", true ) != 3 ) + if ( m_priv->host().tqcontains( ".", true ) != 3 ) { // The IP address is in the first entry: ip = data.first().stripWhiteSpace().section( " ", 0, 0 ); @@ -1311,7 +1311,7 @@ void Smb4KScanner::processSearch() host = data[0].stripWhiteSpace(); } - emit searchResult( new Smb4KHostItem( workgroup, host, QString::null, ip ) ); + emit searchResult( new Smb4KHostItem( workgroup, host, TQString(), ip ) ); } else { @@ -1324,16 +1324,16 @@ void Smb4KScanner::processSearch() { if ( data.count() > 1 && !data[1].isEmpty() ) { - if ( m_buffer.contains( QString( "Connection to %1 failed" ).arg( m_priv->host() ) ) != 0 ) + if ( m_buffer.tqcontains( TQString( "Connection to %1 failed" ).tqarg( m_priv->host() ) ) != 0 ) { emit searchResult( new Smb4KHostItem() ); } else { - QString workgroup = data.grep( "Domain" ).first().section( "Domain=[", 1, 1 ).section( "]", 0, 0 ); - QString ip = data.grep( "Got a positive name query" ).first().section( "(", 1, 1 ).section( ")", 0, 0 ).stripWhiteSpace(); + TQString workgroup = data.grep( "Domain" ).first().section( "Domain=[", 1, 1 ).section( "]", 0, 0 ); + TQString ip = data.grep( "Got a positive name query" ).first().section( "(", 1, 1 ).section( ")", 0, 0 ).stripWhiteSpace(); - emit searchResult( new Smb4KHostItem( workgroup, m_priv->host().upper(), QString::null, ip ) ); + emit searchResult( new Smb4KHostItem( workgroup, m_priv->host().upper(), TQString(), ip ) ); } } else @@ -1359,13 +1359,13 @@ void Smb4KScanner::processInfo() { if ( m_proc->normalExit() ) { - QStringList list = QStringList::split( '\n', m_buffer, false ); + TQStringList list = TQStringList::split( '\n', m_buffer, false ); Smb4KHostItem *host = getHost( m_priv->host(), m_priv->workgroup() ); if ( host ) { - for ( QStringList::ConstIterator it = list.begin(); it != list.end(); ++it ) + for ( TQStringList::ConstIterator it = list.begin(); it != list.end(); ++it ) { if ( (*it).stripWhiteSpace().startsWith( "Domain" ) || (*it).stripWhiteSpace().startsWith( "OS" ) ) { @@ -1377,7 +1377,7 @@ void Smb4KScanner::processInfo() break; } - else if ( (*it).contains( "Connection to", true ) != 0 ) + else if ( (*it).tqcontains( "Connection to", true ) != 0 ) { // The lookup of the info failed: emit failed(); @@ -1407,13 +1407,13 @@ void Smb4KScanner::processInfo() Get a workgroup item out of the workgroup list. ****************************************************************************/ -Smb4KWorkgroupItem *Smb4KScanner::getWorkgroup( const QString &workgroup ) +Smb4KWorkgroupItem *Smb4KScanner::getWorkgroup( const TQString &workgroup ) { - QValueListIterator<Smb4KWorkgroupItem *> it; + TQValueListIterator<Smb4KWorkgroupItem *> it; for ( it = m_workgroups_list->begin(); it != m_workgroups_list->end(); ++it ) { - if ( QString::compare( (*it)->name(), workgroup ) == 0 ) + if ( TQString::compare( (*it)->name(), workgroup ) == 0 ) { break; } @@ -1431,19 +1431,19 @@ Smb4KWorkgroupItem *Smb4KScanner::getWorkgroup( const QString &workgroup ) Get a workgroup item out of the workgroup list. ****************************************************************************/ -Smb4KHostItem *Smb4KScanner::getHost( const QString &name, const QString &workgroup ) +Smb4KHostItem *Smb4KScanner::getHost( const TQString &name, const TQString &workgroup ) { - QValueListIterator<Smb4KHostItem *> it; + TQValueListIterator<Smb4KHostItem *> it; for ( it = m_hosts_list->begin(); it != m_hosts_list->end(); ++it ) { if ( !workgroup.stripWhiteSpace().isEmpty() && - QString::compare( (*it)->workgroup().upper(), workgroup.upper() ) != 0 ) + TQString::compare( (*it)->workgroup().upper(), workgroup.upper() ) != 0 ) { continue; } - if ( QString::compare( (*it)->name().upper(), name.upper() ) == 0 ) + if ( TQString::compare( (*it)->name().upper(), name.upper() ) == 0 ) { break; } @@ -1511,13 +1511,13 @@ void Smb4KScanner::appendWorkgroup( Smb4KWorkgroupItem *item ) } -void Smb4KScanner::timerEvent( QTimerEvent * ) +void Smb4KScanner::timerEvent( TQTimerEvent * ) { // Look for the thing to do (next). // At this point, the topmost item will not be // dequeued. This will be done below. int todo = Idle; - QString *head = NULL; + TQString *head = NULL; if ( (head = m_queue.head()) != 0 ) { @@ -1527,7 +1527,7 @@ void Smb4KScanner::timerEvent( QTimerEvent * ) if ( !m_working && !m_queue.isEmpty() ) { // Start processing with dequeueing the item: - QString *item = m_queue.dequeue(); + TQString *item = m_queue.dequeue(); // Tell the program, that the scanner is running. m_working = true; @@ -1582,7 +1582,7 @@ void Smb4KScanner::timerEvent( QTimerEvent * ) ///////////////////////////////////////////////////////////////////////////// -// SLOT IMPLEMENTATIONS +// TQT_SLOT IMPLEMENTATIONS ///////////////////////////////////////////////////////////////////////////// @@ -1592,7 +1592,7 @@ void Smb4KScanner::timerEvent( QTimerEvent * ) void Smb4KScanner::slotReceivedStdout( KProcess *, char *buf, int len ) { - m_buffer.append( QString::fromLocal8Bit( buf, len ) ); + m_buffer.append( TQString::fromLocal8Bit( buf, len ) ); } @@ -1604,7 +1604,7 @@ void Smb4KScanner::slotProcessExited( KProcess * ) void Smb4KScanner::slotReceivedStderr( KProcess *, char *buf, int len ) { - m_buffer.append( QString::fromLocal8Bit( buf, len ) ); + m_buffer.append( TQString::fromLocal8Bit( buf, len ) ); } @@ -1622,9 +1622,9 @@ void Smb4KScanner::slotReceivedStderr( KProcess *, char *buf, int len ) void Smb4KScanner::lookupIPAddresses() { bool start = false; - QString command = QString::null; + TQString command = TQString(); - for ( QValueList<Smb4KHostItem *>::ConstIterator it = m_hosts_list->begin(); it != m_hosts_list->end(); ++it ) + for ( TQValueList<Smb4KHostItem *>::ConstIterator it = m_hosts_list->begin(); it != m_hosts_list->end(); ++it ) { if ( (*it)->ip().stripWhiteSpace().isEmpty() && !(*it)->ipAddressChecked() ) { @@ -1656,10 +1656,10 @@ void Smb4KScanner::lookupIPAddresses() KProcess *proc = new KProcess( this ); proc->setUseShell( true ); - connect( proc, SIGNAL( receivedStdout( KProcess *, char *, int ) ), - this, SLOT( slotReceivedIPAddresses( KProcess *, char *, int ) ) ); - connect( proc, SIGNAL( processExited( KProcess * ) ), - this, SLOT( slotIPAddressProcessExited( KProcess * ) ) ); + connect( proc, TQT_SIGNAL( receivedStdout( KProcess *, char *, int ) ), + this, TQT_SLOT( slotReceivedIPAddresses( KProcess *, char *, int ) ) ); + connect( proc, TQT_SIGNAL( processExited( KProcess * ) ), + this, TQT_SLOT( slotIPAddressProcessExited( KProcess * ) ) ); *proc << command; proc->start( KProcess::NotifyOnExit, KProcess::Stdout ); @@ -1675,12 +1675,12 @@ void Smb4KScanner::slotReceivedIPAddresses( KProcess *, char *buf, int len ) { // WARNING: Do not implement error handling here!!! - QString buffer = QString::fromLocal8Bit( buf, len ); + TQString buffer = TQString::fromLocal8Bit( buf, len ); if ( !buffer.stripWhiteSpace().isEmpty() ) { - QString ip = buffer.stripWhiteSpace().section( " ", 0, 0 ).stripWhiteSpace(); - QString host = buffer.stripWhiteSpace().section( " ", 1, 1 ).section( "<00>", 0, 0 ).stripWhiteSpace(); + TQString ip = buffer.stripWhiteSpace().section( " ", 0, 0 ).stripWhiteSpace(); + TQString host = buffer.stripWhiteSpace().section( " ", 1, 1 ).section( "<00>", 0, 0 ).stripWhiteSpace(); if ( !host.isEmpty() && !ip.isEmpty() ) { |