diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:33:34 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:33:34 +0000 |
commit | c663b6440964f6ac48027143ac9e63298991f9d0 (patch) | |
tree | 6d8b0c5a5f9db1ee16acf98b1397cea9126b281d /kcontrol/ebrowsing/plugins/localdomain | |
parent | a061f7191beebb0e4a3b0c0a7c534ec5f22f2dc7 (diff) | |
download | tdebase-c663b6440964f6ac48027143ac9e63298991f9d0.tar.gz tdebase-c663b6440964f6ac48027143ac9e63298991f9d0.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1157639 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kcontrol/ebrowsing/plugins/localdomain')
-rw-r--r-- | kcontrol/ebrowsing/plugins/localdomain/localdomainurifilter.cpp | 28 | ||||
-rw-r--r-- | kcontrol/ebrowsing/plugins/localdomain/localdomainurifilter.h | 12 |
2 files changed, 20 insertions, 20 deletions
diff --git a/kcontrol/ebrowsing/plugins/localdomain/localdomainurifilter.cpp b/kcontrol/ebrowsing/plugins/localdomain/localdomainurifilter.cpp index 3bd247729..f0986c188 100644 --- a/kcontrol/ebrowsing/plugins/localdomain/localdomainurifilter.cpp +++ b/kcontrol/ebrowsing/plugins/localdomain/localdomainurifilter.cpp @@ -26,8 +26,8 @@ #include <kstandarddirs.h> #include <kdebug.h> -#include <qregexp.h> -#include <qfile.h> +#include <tqregexp.h> +#include <tqfile.h> #define HOSTPORT_PATTERN "[a-zA-Z0-9][a-zA-Z0-9+-]*(?:\\:[0-9]{1,5})?(?:/[\\w:@&=+$,-.!~*'()]*)*" @@ -36,12 +36,12 @@ * kdelibs/kio/tests/kurifiltertest */ -LocalDomainURIFilter::LocalDomainURIFilter( QObject *parent, const char *name, - const QStringList & /*args*/ ) +LocalDomainURIFilter::LocalDomainURIFilter( TQObject *parent, const char *name, + const TQStringList & /*args*/ ) : KURIFilterPlugin( parent, name ? name : "localdomainurifilter", 1.0 ), DCOPObject( "LocalDomainURIFilterIface" ), last_time( 0 ), - m_hostPortPattern( QString::fromLatin1(HOSTPORT_PATTERN) ) + m_hostPortPattern( TQString::fromLatin1(HOSTPORT_PATTERN) ) { configure(); } @@ -49,14 +49,14 @@ LocalDomainURIFilter::LocalDomainURIFilter( QObject *parent, const char *name, bool LocalDomainURIFilter::filterURI( KURIFilterData& data ) const { KURL url = data.uri(); - QString cmd = url.url(); + TQString cmd = url.url(); kdDebug() << "LocalDomainURIFilter::filterURI: " << url << endl; if( m_hostPortPattern.exactMatch( cmd ) && isLocalDomainHost( cmd ) ) { - cmd.prepend( QString::fromLatin1("http://") ); + cmd.prepend( TQString::fromLatin1("http://") ); setFilteredURI( data, KURL( cmd ) ); setURIType( data, KURIFilterData::NET_PROTOCOL ); @@ -68,24 +68,24 @@ bool LocalDomainURIFilter::filterURI( KURIFilterData& data ) const } // if it's e.g. just 'www', try if it's a hostname in the local search domain -bool LocalDomainURIFilter::isLocalDomainHost( QString& cmd ) const +bool LocalDomainURIFilter::isLocalDomainHost( TQString& cmd ) const { // find() returns -1 when no match -> left()/truncate() are noops then - QString host( cmd.left( cmd.find( '/' ) ) ); + TQString host( cmd.left( cmd.find( '/' ) ) ); host.truncate( host.find( ':' ) ); // Remove port number if( !(host == last_host && last_time > time( NULL ) - 5 ) ) { - QString helper = KStandardDirs::findExe(QString::fromLatin1( "klocaldomainurifilterhelper" )); + TQString helper = KStandardDirs::findExe(TQString::fromLatin1( "klocaldomainurifilterhelper" )); if( helper.isEmpty()) return last_result = false; - m_fullname = QString::null; + m_fullname = TQString::null; KProcess proc; proc << helper << host; - connect( &proc, SIGNAL(receivedStdout(KProcess *, char *, int)), - SLOT(receiveOutput(KProcess *, char *, int)) ); + connect( &proc, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)), + TQT_SLOT(receiveOutput(KProcess *, char *, int)) ); if( !proc.start( KProcess::NotifyOnExit, KProcess::Stdout )) return last_result = false; @@ -103,7 +103,7 @@ bool LocalDomainURIFilter::isLocalDomainHost( QString& cmd ) const void LocalDomainURIFilter::receiveOutput( KProcess *, char *buf, int ) { - m_fullname = QFile::decodeName( buf ); + m_fullname = TQFile::decodeName( buf ); } void LocalDomainURIFilter::configure() diff --git a/kcontrol/ebrowsing/plugins/localdomain/localdomainurifilter.h b/kcontrol/ebrowsing/plugins/localdomain/localdomainurifilter.h index 465214e69..0c8035d89 100644 --- a/kcontrol/ebrowsing/plugins/localdomain/localdomainurifilter.h +++ b/kcontrol/ebrowsing/plugins/localdomain/localdomainurifilter.h @@ -26,7 +26,7 @@ #include <dcopobject.h> #include <kgenericfactory.h> #include <kurifilter.h> -#include <qregexp.h> +#include <tqregexp.h> class KInstance; class KProcess; @@ -44,19 +44,19 @@ class LocalDomainURIFilter : public KURIFilterPlugin, public DCOPObject Q_OBJECT public: - LocalDomainURIFilter( QObject* parent, const char* name, const QStringList& args ); + LocalDomainURIFilter( TQObject* parent, const char* name, const TQStringList& args ); virtual bool filterURI( KURIFilterData &data ) const; k_dcop: virtual void configure(); private: - bool isLocalDomainHost( QString& cmd ) const; - mutable QString last_host; + bool isLocalDomainHost( TQString& cmd ) const; + mutable TQString last_host; mutable bool last_result; mutable time_t last_time; - mutable QString m_fullname; - QRegExp m_hostPortPattern; + mutable TQString m_fullname; + TQRegExp m_hostPortPattern; private slots: void receiveOutput( KProcess *, char *, int ); |