diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:46:43 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:46:43 +0000 |
commit | ffe8a83e053396df448e9413828527613ca3bd46 (patch) | |
tree | a73d4169e02df4a50f9a12cb165fcd0ab5bac7c6 /kabc/plugins/net | |
parent | 682bf3bfdcbcbb1fca85e8a36ed03e062e0555d5 (diff) | |
download | tdelibs-ffe8a83e053396df448e9413828527613ca3bd46.tar.gz tdelibs-ffe8a83e053396df448e9413828527613ca3bd46.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1157647 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kabc/plugins/net')
-rw-r--r-- | kabc/plugins/net/resourcenet.cpp | 36 | ||||
-rw-r--r-- | kabc/plugins/net/resourcenet.h | 14 | ||||
-rw-r--r-- | kabc/plugins/net/resourcenetconfig.cpp | 16 | ||||
-rw-r--r-- | kabc/plugins/net/resourcenetconfig.h | 4 |
4 files changed, 35 insertions, 35 deletions
diff --git a/kabc/plugins/net/resourcenet.cpp b/kabc/plugins/net/resourcenet.cpp index 49d66d9e0..914885877 100644 --- a/kabc/plugins/net/resourcenet.cpp +++ b/kabc/plugins/net/resourcenet.cpp @@ -18,7 +18,7 @@ Boston, MA 02110-1301, USA. */ -#include <qfile.h> +#include <tqfile.h> #include <kdebug.h> #include <kio/netaccess.h> @@ -46,7 +46,7 @@ class ResourceNet::ResourceNetPrivate KIO::Job *mSaveJob; bool mIsSaving; - QString mLastErrorString; + TQString mLastErrorString; }; ResourceNet::ResourceNet( const KConfig *config ) @@ -57,11 +57,11 @@ ResourceNet::ResourceNet( const KConfig *config ) if ( config ) { init( KURL( config->readPathEntry( "NetUrl" ) ), config->readEntry( "NetFormat" ) ); } else { - init( KURL(), QString("vcard").latin1() ); + init( KURL(), TQString("vcard").latin1() ); } } -ResourceNet::ResourceNet( const KURL &url, const QString &format ) +ResourceNet::ResourceNet( const KURL &url, const TQString &format ) : Resource( 0 ), mFormat( 0 ), mTempFile( 0 ), d( new ResourceNetPrivate ) @@ -69,7 +69,7 @@ ResourceNet::ResourceNet( const KURL &url, const QString &format ) init( url, format ); } -void ResourceNet::init( const KURL &url, const QString &format ) +void ResourceNet::init( const KURL &url, const TQString &format ) { d->mLoadJob = 0; d->mIsLoading = false; @@ -81,7 +81,7 @@ void ResourceNet::init( const KURL &url, const QString &format ) FormatFactory *factory = FormatFactory::self(); mFormat = factory->format( mFormatName ); if ( !mFormat ) { - mFormatName = QString("vcard").latin1(); + mFormatName = TQString("vcard").latin1(); mFormat = factory->format( mFormatName ); } @@ -135,14 +135,14 @@ void ResourceNet::doClose() bool ResourceNet::load() { - QString tempFile; + TQString tempFile; if ( !KIO::NetAccess::download( mUrl, tempFile, 0 ) ) { addressBook()->error( i18n( "Unable to download file '%1'." ).arg( mUrl.prettyURL() ) ); return false; } - QFile file( tempFile ); + TQFile file( tempFile ); if ( !file.open( IO_ReadOnly ) ) { addressBook()->error( i18n( "Unable to open file '%1'." ).arg( tempFile ) ); KIO::NetAccess::removeTempFile( tempFile ); @@ -158,7 +158,7 @@ bool ResourceNet::load() return result; } -bool ResourceNet::clearAndLoad( QFile *file ) +bool ResourceNet::clearAndLoad( TQFile *file ) { clear(); return mFormat->loadAll( addressBook(), this, file ); @@ -192,8 +192,8 @@ bool ResourceNet::asyncLoad() KIO::Scheduler::checkSlaveOnHold( true ); d->mLoadJob = KIO::file_copy( mUrl, dest, -1, true, false, false ); d->mIsLoading = true; - connect( d->mLoadJob, SIGNAL( result( KIO::Job* ) ), - this, SLOT( downloadFinished( KIO::Job* ) ) ); + connect( d->mLoadJob, TQT_SIGNAL( result( KIO::Job* ) ), + this, TQT_SLOT( downloadFinished( KIO::Job* ) ) ); return true; } @@ -286,8 +286,8 @@ bool ResourceNet::asyncSave( Ticket* ) KIO::Scheduler::checkSlaveOnHold( true ); d->mIsSaving = true; d->mSaveJob = KIO::file_copy( src, mUrl, -1, true, false, false ); - connect( d->mSaveJob, SIGNAL( result( KIO::Job* ) ), - this, SLOT( uploadFinished( KIO::Job* ) ) ); + connect( d->mSaveJob, TQT_SIGNAL( result( KIO::Job* ) ), + this, TQT_SLOT( uploadFinished( KIO::Job* ) ) ); return true; } @@ -314,7 +314,7 @@ void ResourceNet::deleteLocalTempFile() mTempFile = 0; } -void ResourceNet::saveToFile( QFile *file ) +void ResourceNet::saveToFile( TQFile *file ) { mFormat->saveAll( addressBook(), this, file ); } @@ -329,7 +329,7 @@ KURL ResourceNet::url() const return mUrl; } -void ResourceNet::setFormat( const QString &name ) +void ResourceNet::setFormat( const TQString &name ) { mFormatName = name; if ( mFormat ) @@ -339,7 +339,7 @@ void ResourceNet::setFormat( const QString &name ) mFormat = factory->format( mFormatName ); } -QString ResourceNet::format() const +TQString ResourceNet::format() const { return mFormatName; } @@ -352,11 +352,11 @@ void ResourceNet::downloadFinished( KIO::Job* ) if ( !hasTempFile() || mTempFile->status() != 0 ) { d->mLastErrorString = i18n( "Download failed: Unable to create temporary file" ); - QTimer::singleShot( 0, this, SLOT( signalError() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( signalError() ) ); return; } - QFile file( mTempFile->name() ); + TQFile file( mTempFile->name() ); if ( file.open( IO_ReadOnly ) ) { if ( clearAndLoad( &file ) ) emit loadingFinished( this ); diff --git a/kabc/plugins/net/resourcenet.h b/kabc/plugins/net/resourcenet.h index b315be6df..ccb59694d 100644 --- a/kabc/plugins/net/resourcenet.h +++ b/kabc/plugins/net/resourcenet.h @@ -48,7 +48,7 @@ class KABC_EXPORT ResourceNet : public Resource public: ResourceNet( const KConfig* ); - ResourceNet( const KURL &url, const QString &format ); + ResourceNet( const KURL &url, const TQString &format ); ~ResourceNet(); virtual void writeConfig( KConfig* ); @@ -77,15 +77,15 @@ class KABC_EXPORT ResourceNet : public Resource /** Sets a new format by name. */ - void setFormat( const QString &name ); + void setFormat( const TQString &name ); /** Returns the format name. */ - QString format() const; + TQString format() const; protected: - void init( const KURL &url, const QString &format ); + void init( const KURL &url, const TQString &format ); private slots: void downloadFinished( KIO::Job* ); @@ -93,8 +93,8 @@ class KABC_EXPORT ResourceNet : public Resource void signalError(); private: - bool clearAndLoad( QFile *file ); - void saveToFile( QFile *file ); + bool clearAndLoad( TQFile *file ); + void saveToFile( TQFile *file ); bool hasTempFile() const { return mTempFile != 0; } void abortAsyncLoading(); void abortAsyncSaving(); @@ -103,7 +103,7 @@ class KABC_EXPORT ResourceNet : public Resource void deleteStaleTempFile(); FormatPlugin *mFormat; - QString mFormatName; + TQString mFormatName; KURL mUrl; KTempFile *mTempFile; diff --git a/kabc/plugins/net/resourcenetconfig.cpp b/kabc/plugins/net/resourcenetconfig.cpp index ef5bfdcb9..b441fbd98 100644 --- a/kabc/plugins/net/resourcenetconfig.cpp +++ b/kabc/plugins/net/resourcenetconfig.cpp @@ -18,8 +18,8 @@ Boston, MA 02110-1301, USA. */ -#include <qlabel.h> -#include <qlayout.h> +#include <tqlabel.h> +#include <tqlayout.h> #include <kdebug.h> #include <klocale.h> @@ -33,19 +33,19 @@ using namespace KABC; -ResourceNetConfig::ResourceNetConfig( QWidget* parent, const char* name ) +ResourceNetConfig::ResourceNetConfig( TQWidget* parent, const char* name ) : ConfigWidget( parent, name ), mInEditMode( false ) { - QGridLayout *mainLayout = new QGridLayout( this, 2, 2, 0, + TQGridLayout *mainLayout = new TQGridLayout( this, 2, 2, 0, KDialog::spacingHint() ); - QLabel *label = new QLabel( i18n( "Format:" ), this ); + TQLabel *label = new TQLabel( i18n( "Format:" ), this ); mFormatBox = new KComboBox( this ); mainLayout->addWidget( label, 0, 0 ); mainLayout->addWidget( mFormatBox, 0, 1 ); - label = new QLabel( i18n( "Location:" ), this ); + label = new TQLabel( i18n( "Location:" ), this ); mUrlEdit = new KURLRequester( this ); mUrlEdit->setMode( KFile::File ); @@ -53,8 +53,8 @@ ResourceNetConfig::ResourceNetConfig( QWidget* parent, const char* name ) mainLayout->addWidget( mUrlEdit, 1, 1 ); FormatFactory *factory = FormatFactory::self(); - QStringList formats = factory->formats(); - QStringList::Iterator it; + TQStringList formats = factory->formats(); + TQStringList::Iterator it; for ( it = formats.begin(); it != formats.end(); ++it ) { FormatInfo *info = factory->info( *it ); if ( info ) { diff --git a/kabc/plugins/net/resourcenetconfig.h b/kabc/plugins/net/resourcenetconfig.h index e35c46c01..e07937739 100644 --- a/kabc/plugins/net/resourcenetconfig.h +++ b/kabc/plugins/net/resourcenetconfig.h @@ -33,7 +33,7 @@ class KABC_EXPORT ResourceNetConfig : public KRES::ConfigWidget Q_OBJECT public: - ResourceNetConfig( QWidget* parent = 0, const char* name = 0 ); + ResourceNetConfig( TQWidget* parent = 0, const char* name = 0 ); void setEditMode( bool value ); @@ -45,7 +45,7 @@ class KABC_EXPORT ResourceNetConfig : public KRES::ConfigWidget KComboBox* mFormatBox; KURLRequester* mUrlEdit; - QStringList mFormatTypes; + TQStringList mFormatTypes; bool mInEditMode; }; |