diff options
Diffstat (limited to 'kabc')
30 files changed, 234 insertions, 234 deletions
diff --git a/kabc/addressbook.cpp b/kabc/addressbook.cpp index 45d4f10e3..b31df2b73 100644 --- a/kabc/addressbook.cpp +++ b/kabc/addressbook.cpp @@ -41,7 +41,7 @@ struct AddressBook::AddressBookData { Field::List mAllFields; ErrorHandler *mErrorHandler; - KConfig *mConfig; + TDEConfig *mConfig; KRES::Manager<Resource> *mManager; TQPtrList<Resource> mPendingLoadResources; TQPtrList<Resource> mPendingSaveResources; @@ -318,7 +318,7 @@ AddressBook::AddressBook( const TQString &config ) if ( config.isEmpty() ) d->mConfig = 0; else - d->mConfig = new KConfig( config ); + d->mConfig = new TDEConfig( config ); d->mManager = new KRES::Manager<Resource>( "contact" ); d->mManager->readConfig( d->mConfig ); d->end.d->mResources = TQValueList<Resource*>(); diff --git a/kabc/addresseehelper.cpp b/kabc/addresseehelper.cpp index f04adc95f..908795869 100644 --- a/kabc/addresseehelper.cpp +++ b/kabc/addresseehelper.cpp @@ -81,7 +81,7 @@ void AddresseeHelper::initSettings() mPrefixes.insert( "von" ); mPrefixes.insert( "de" ); - KConfig config( "kabcrc", true, false ); // readonly, no kdeglobals + TDEConfig config( "kabcrc", true, false ); // readonly, no kdeglobals config.setGroup( "General" ); addToSet( config.readListEntry( "Prefixes" ), mTitles ); diff --git a/kabc/addresslineedit.cpp b/kabc/addresslineedit.cpp index 6f056a404..76d99f634 100644 --- a/kabc/addresslineedit.cpp +++ b/kabc/addresslineedit.cpp @@ -61,13 +61,13 @@ TQTimer* AddressLineEdit::s_LDAPTimer = 0L; LdapSearch* AddressLineEdit::s_LDAPSearch = 0L; TQString* AddressLineEdit::s_LDAPText = 0L; AddressLineEdit* AddressLineEdit::s_LDAPLineEdit = 0L; -KConfig *AddressLineEdit::s_config = 0L; +TDEConfig *AddressLineEdit::s_config = 0L; static KStaticDeleter<KCompletion> completionDeleter; static KStaticDeleter<TQTimer> ldapTimerDeleter; static KStaticDeleter<LdapSearch> ldapSearchDeleter; static KStaticDeleter<TQString> ldapTextDeleter; -static KStaticDeleter<KConfig> configDeleter; +static KStaticDeleter<TDEConfig> configDeleter; AddressLineEdit::AddressLineEdit(TQWidget* parent, bool useCompletion, @@ -136,10 +136,10 @@ AddressLineEdit::~AddressLineEdit() //----------------------------------------------------------------------------- -KConfig* AddressLineEdit::config() +TDEConfig* AddressLineEdit::config() { if ( !s_config ) - configDeleter.setObject( s_config, new KConfig( "kabldaprc", false, false ) ); // Open read-write, no kdeglobals + configDeleter.setObject( s_config, new TDEConfig( "kabldaprc", false, false ) ); // Open read-write, no kdeglobals return s_config; } diff --git a/kabc/addresslineedit.h b/kabc/addresslineedit.h index 093acf97b..0cbd5dd43 100644 --- a/kabc/addresslineedit.h +++ b/kabc/addresslineedit.h @@ -30,7 +30,7 @@ #include "klineedit.h" #include "kcompletion.h" -class KConfig; +class TDEConfig; namespace KABC { @@ -61,7 +61,7 @@ public: */ virtual void setFont( const TQFont& ); - static KConfig *config(); + static TDEConfig *config(); public slots: /** @@ -112,7 +112,7 @@ private: static LdapSearch *s_LDAPSearch; static TQString *s_LDAPText; static AddressLineEdit *s_LDAPLineEdit; - static KConfig *s_config; + static TDEConfig *s_config; private: class AddressLineEditPrivate* d; diff --git a/kabc/field.h b/kabc/field.h index 7a622b90f..118ce2d51 100644 --- a/kabc/field.h +++ b/kabc/field.h @@ -26,7 +26,7 @@ #include "addressee.h" -class KConfig; +class TDEConfig; namespace KABC { @@ -134,7 +134,7 @@ public: * @param identifier The unique identifier * @param fields The list of the fields */ - static void saveFields( KConfig *cfg, const TQString &identifier, + static void saveFields( TDEConfig *cfg, const TQString &identifier, const Field::List &fields ); /** * This is the same as above, with the difference, that @@ -149,7 +149,7 @@ public: * @param cfg The config file object * @param identifier The unique identifier */ - static Field::List restoreFields( KConfig *cfg, const TQString &identifier ); + static Field::List restoreFields( TDEConfig *cfg, const TQString &identifier ); /** * This is the same as above, with the difference, that diff --git a/kabc/kab2kabc.cpp b/kabc/kab2kabc.cpp index 2447229da..11b80639a 100644 --- a/kabc/kab2kabc.cpp +++ b/kabc/kab2kabc.cpp @@ -123,7 +123,7 @@ void importKMailAddressBook( KABC::AddressBook *ab ) TQString fileName = locateLocal( "data", "kmail/addressbook" ); TQString kmailConfigName = locate( "config", "kmailrc" ); if ( !kmailConfigName.isEmpty() ) { - KConfig cfg( kmailConfigName ); + TDEConfig cfg( kmailConfigName ); cfg.setGroup( "Addressbook" ); fileName = cfg.readPathEntry( "default", fileName ); } @@ -458,7 +458,7 @@ int main( int argc, char **argv ) if ( args->isSet( "disable-autostart" ) ) { kdDebug() << "Disable autostart." << endl; - KConfig *config = app.config(); + TDEConfig *config = app.config(); config->setGroup( "Startup" ); config->writeEntry( "EnableAutostart", false ); } diff --git a/kabc/ldapclient.cpp b/kabc/ldapclient.cpp index 39e4c504f..568408ba2 100644 --- a/kabc/ldapclient.cpp +++ b/kabc/ldapclient.cpp @@ -137,12 +137,12 @@ void LdapClient::startQuery( const TQString& filter ) startParseLDIF(); mActive = true; - mJob = KIO::get( url, false, false ); - connect( mJob, TQT_SIGNAL( data( KIO::Job*, const TQByteArray& ) ), - this, TQT_SLOT( slotData( KIO::Job*, const TQByteArray& ) ) ); - connect( mJob, TQT_SIGNAL( infoMessage( KIO::Job*, const TQString& ) ), - this, TQT_SLOT( slotInfoMessage( KIO::Job*, const TQString& ) ) ); - connect( mJob, TQT_SIGNAL( result( KIO::Job* ) ), + mJob = TDEIO::get( url, false, false ); + connect( mJob, TQT_SIGNAL( data( TDEIO::Job*, const TQByteArray& ) ), + this, TQT_SLOT( slotData( TDEIO::Job*, const TQByteArray& ) ) ); + connect( mJob, TQT_SIGNAL( infoMessage( TDEIO::Job*, const TQString& ) ), + this, TQT_SLOT( slotInfoMessage( TDEIO::Job*, const TQString& ) ) ); + connect( mJob, TQT_SIGNAL( result( TDEIO::Job* ) ), this, TQT_SLOT( slotDone() ) ); } @@ -156,7 +156,7 @@ void LdapClient::cancelQuery() mActive = false; } -void LdapClient::slotData( KIO::Job*, const TQByteArray& data ) +void LdapClient::slotData( TDEIO::Job*, const TQByteArray& data ) { #ifndef NDEBUG // don't create the QString // TQString str( data ); @@ -165,7 +165,7 @@ void LdapClient::slotData( KIO::Job*, const TQByteArray& data ) parseLDIF( data ); } -void LdapClient::slotInfoMessage( KIO::Job*, const TQString & ) +void LdapClient::slotInfoMessage( TDEIO::Job*, const TQString & ) { //tqDebug("Job said \"%s\"", info.latin1()); } @@ -180,8 +180,8 @@ void LdapClient::slotDone() } #endif int err = mJob->error(); - if ( err && err != KIO::ERR_USER_CANCELED ) { - emit error( KIO::buildErrorString( err, TQString("%1:%2").arg( mHost ).arg( mPort ) ) ); + if ( err && err != TDEIO::ERR_USER_CANCELED ) { + emit error( TDEIO::buildErrorString( err, TQString("%1:%2").arg( mHost ).arg( mPort ) ) ); } emit done(); } @@ -251,7 +251,7 @@ LdapSearch::LdapSearch() } // stolen from KAddressBook - KConfig config( "kabldaprc", true ); + TDEConfig config( "kabldaprc", true ); config.setGroup( "LDAP" ); int numHosts = config.readUnsignedNumEntry( "NumSelectedHosts"); if ( !numHosts ) { diff --git a/kabc/ldapclient.h b/kabc/ldapclient.h index 2054b1302..5f8513599 100644 --- a/kabc/ldapclient.h +++ b/kabc/ldapclient.h @@ -157,8 +157,8 @@ class KABC_EXPORT LdapClient : public TQObject void cancelQuery(); protected slots: - void slotData( KIO::Job*, const TQByteArray &data ); - void slotInfoMessage( KIO::Job*, const TQString &info ); + void slotData( TDEIO::Job*, const TQByteArray &data ); + void slotInfoMessage( TDEIO::Job*, const TQString &info ); void slotDone(); protected: @@ -172,7 +172,7 @@ class KABC_EXPORT LdapClient : public TQObject TQString mScope; TQStringList mAttrs; - TQGuardedPtr<KIO::SimpleJob> mJob; + TQGuardedPtr<TDEIO::SimpleJob> mJob; bool mActive; LdapObject mCurrentObject; diff --git a/kabc/ldapconfigwidget.cpp b/kabc/ldapconfigwidget.cpp index b0a899d8c..eff79a73a 100644 --- a/kabc/ldapconfigwidget.cpp +++ b/kabc/ldapconfigwidget.cpp @@ -243,7 +243,7 @@ void LdapConfigWidget::initWidget() } -void LdapConfigWidget::loadData( KIO::Job*, const TQByteArray& d ) +void LdapConfigWidget::loadData( TDEIO::Job*, const TQByteArray& d ) { LDIF::ParseVal ret; @@ -261,10 +261,10 @@ void LdapConfigWidget::loadData( KIO::Job*, const TQByteArray& d ) } while ( ret != LDIF::MoreData ); } -void LdapConfigWidget::loadResult( KIO::Job* job) +void LdapConfigWidget::loadResult( TDEIO::Job* job) { int error = job->error(); - if ( error && error != KIO::ERR_USER_CANCELED ) + if ( error && error != TDEIO::ERR_USER_CANCELED ) mErrorMsg = job->errorString(); else mErrorMsg = ""; @@ -291,12 +291,12 @@ void LdapConfigWidget::sendQuery() kdDebug(5700) << "sendQuery url: " << _url.prettyURL() << endl; mLdif.startParsing(); - KIO::Job *job = KIO::get( _url, true, false ); + TDEIO::Job *job = TDEIO::get( _url, true, false ); job->addMetaData("no-auth-prompt","true"); - connect( job, TQT_SIGNAL( data( KIO::Job*, const TQByteArray& ) ), - this, TQT_SLOT( loadData( KIO::Job*, const TQByteArray& ) ) ); - connect( job, TQT_SIGNAL( result( KIO::Job* ) ), - this, TQT_SLOT( loadResult( KIO::Job* ) ) ); + connect( job, TQT_SIGNAL( data( TDEIO::Job*, const TQByteArray& ) ), + this, TQT_SLOT( loadData( TDEIO::Job*, const TQByteArray& ) ) ); + connect( job, TQT_SIGNAL( result( TDEIO::Job* ) ), + this, TQT_SLOT( loadResult( TDEIO::Job* ) ) ); if ( mProg == NULL ) mProg = new KProgressDialog( this, 0, i18n("LDAP Query"), _url.prettyURL(), true ); diff --git a/kabc/ldapconfigwidget.h b/kabc/ldapconfigwidget.h index c4144b027..0fd0dd7e5 100644 --- a/kabc/ldapconfigwidget.h +++ b/kabc/ldapconfigwidget.h @@ -44,7 +44,7 @@ namespace KABC { @short LDAP Configuration widget This class can be used to query the user for LDAP connection parameters. - It's KConfigXT compatible, using widget names starting with kcfg_ + It's TDEConfigXT compatible, using widget names starting with kcfg_ */ class KABC_EXPORT LdapConfigWidget : public TQWidget @@ -223,23 +223,23 @@ namespace KABC { /** * Sets the size limit. - * KConfig widget name: kcfg_ldapsizelimit + * TDEConfig widget name: kcfg_ldapsizelimit */ void setSizeLimit( int sizelimit ); /** * Returns the size limit. - * KConfig widget name: kcfg_ldapsizelimit + * TDEConfig widget name: kcfg_ldapsizelimit */ int sizeLimit() const; /** * Sets the time limit. - * KConfig widget name: kcfg_ldaptimelimit + * TDEConfig widget name: kcfg_ldaptimelimit */ void setTimeLimit( int timelimit ); /** * Returns the time limit. - * KConfig widget name: kcfg_ldaptimelimit + * TDEConfig widget name: kcfg_ldaptimelimit */ int timeLimit() const; @@ -262,8 +262,8 @@ namespace KABC { void setSASL( int state ); void mQueryDNClicked(); void mQueryMechClicked(); - void loadData( KIO::Job*, const TQByteArray& ); - void loadResult( KIO::Job* ); + void loadData( TDEIO::Job*, const TQByteArray& ); + void loadResult( TDEIO::Job* ); private: int mFlags; diff --git a/kabc/plugins/dir/resourcedir.cpp b/kabc/plugins/dir/resourcedir.cpp index 0897c9cee..0dfd0352a 100644 --- a/kabc/plugins/dir/resourcedir.cpp +++ b/kabc/plugins/dir/resourcedir.cpp @@ -56,7 +56,7 @@ extern "C" } -ResourceDir::ResourceDir( const KConfig *config ) +ResourceDir::ResourceDir( const TDEConfig *config ) : Resource( config ), mAsynchronous( false ) { if ( config ) { @@ -100,7 +100,7 @@ ResourceDir::~ResourceDir() mFormat = 0; } -void ResourceDir::writeConfig( KConfig *config ) +void ResourceDir::writeConfig( TDEConfig *config ) { Resource::writeConfig( config ); diff --git a/kabc/plugins/dir/resourcedir.h b/kabc/plugins/dir/resourcedir.h index 96c894e2e..a7b041643 100644 --- a/kabc/plugins/dir/resourcedir.h +++ b/kabc/plugins/dir/resourcedir.h @@ -43,11 +43,11 @@ class KABC_EXPORT ResourceDir : public Resource Q_OBJECT public: - ResourceDir( const KConfig* ); + ResourceDir( const TDEConfig* ); ResourceDir( const TQString &path, const TQString &type = "vcard" ); ~ResourceDir(); - virtual void writeConfig( KConfig* ); + virtual void writeConfig( TDEConfig* ); virtual bool doOpen(); virtual void doClose(); diff --git a/kabc/plugins/evolution/resourceevo.cpp b/kabc/plugins/evolution/resourceevo.cpp index 9a44b2adb..415e9928a 100644 --- a/kabc/plugins/evolution/resourceevo.cpp +++ b/kabc/plugins/evolution/resourceevo.cpp @@ -17,7 +17,7 @@ using namespace KABC; class EvolutionFactory : public KRES::PluginFactoryBase { public: - KRES::Resource *resource( const KConfig *config ) + KRES::Resource *resource( const TDEConfig *config ) { return new ResourceEvolution( config ); } @@ -36,7 +36,7 @@ extern "C" } } -ResourceEvolution::ResourceEvolution( const KConfig* conf ) +ResourceEvolution::ResourceEvolution( const TDEConfig* conf ) : Resource( conf ), mWrap(0l) { m_isOpen = false; diff --git a/kabc/plugins/evolution/resourceevo.h b/kabc/plugins/evolution/resourceevo.h index 0f5b3a0d2..29e163e1c 100644 --- a/kabc/plugins/evolution/resourceevo.h +++ b/kabc/plugins/evolution/resourceevo.h @@ -7,7 +7,7 @@ namespace Evolution { namespace KABC { class ResourceEvolution : public Resource { public: - ResourceEvolution( const KConfig* config ); + ResourceEvolution( const TDEConfig* config ); ~ResourceEvolution(); bool doOpen(); diff --git a/kabc/plugins/file/resourcefile.cpp b/kabc/plugins/file/resourcefile.cpp index b391dffa5..3e5b1fa8f 100644 --- a/kabc/plugins/file/resourcefile.cpp +++ b/kabc/plugins/file/resourcefile.cpp @@ -46,7 +46,7 @@ using namespace KABC; -ResourceFile::ResourceFile( const KConfig *config ) +ResourceFile::ResourceFile( const TDEConfig *config ) : Resource( config ), mFormat( 0 ), mAsynchronous( false ) { @@ -98,7 +98,7 @@ ResourceFile::~ResourceFile() mFormat = 0; } -void ResourceFile::writeConfig( KConfig *config ) +void ResourceFile::writeConfig( TDEConfig *config ) { Resource::writeConfig( config ); diff --git a/kabc/plugins/file/resourcefile.h b/kabc/plugins/file/resourcefile.h index b44c22ec1..494c43ea6 100644 --- a/kabc/plugins/file/resourcefile.h +++ b/kabc/plugins/file/resourcefile.h @@ -47,7 +47,7 @@ class KABC_EXPORT ResourceFile : public Resource @param cfg The config object where custom resource settings are stored. */ - ResourceFile( const KConfig *cfg ); + ResourceFile( const TDEConfig *cfg ); /** Construct file resource on file @arg fileName using format @arg formatName. @@ -62,7 +62,7 @@ class KABC_EXPORT ResourceFile : public Resource /** Writes the config back. */ - virtual void writeConfig( KConfig *cfg ); + virtual void writeConfig( TDEConfig *cfg ); /** Tries to open the file and checks for the proper format. diff --git a/kabc/plugins/ldapkio/resourceldapkio.cpp b/kabc/plugins/ldapkio/resourceldapkio.cpp index e8da1b6aa..03a49e819 100644 --- a/kabc/plugins/ldapkio/resourceldapkio.cpp +++ b/kabc/plugins/ldapkio/resourceldapkio.cpp @@ -47,7 +47,7 @@ using namespace KABC; void tqt_enter_modal( TQWidget *widget ); void tqt_leave_modal( TQWidget *widget ); -class ResourceLDAPKIO::ResourceLDAPKIOPrivate +class ResourceLDAPTDEIO::ResourceLDAPKIOPrivate { public: LDIF mLdif; @@ -69,7 +69,7 @@ class ResourceLDAPKIO::ResourceLDAPKIOPrivate KTempFile *mTmp; }; -ResourceLDAPKIO::ResourceLDAPKIO( const KConfig *config ) +ResourceLDAPTDEIO::ResourceLDAPKIO( const TDEConfig *config ) : Resource( config ) { d = new ResourceLDAPKIOPrivate; @@ -115,12 +115,12 @@ ResourceLDAPKIO::ResourceLDAPKIO( const KConfig *config ) init(); } -ResourceLDAPKIO::~ResourceLDAPKIO() +ResourceLDAPTDEIO::~ResourceLDAPKIO() { delete d; } -void ResourceLDAPKIO::enter_loop() +void ResourceLDAPTDEIO::enter_loop() { TQWidget dummy(0,0,(WFlags)(WType_Dialog | WShowModal)); dummy.setFocusPolicy( TQ_NoFocus ); @@ -129,14 +129,14 @@ void ResourceLDAPKIO::enter_loop() tqt_leave_modal(&dummy); } -void ResourceLDAPKIO::entries( KIO::Job*, const KIO::UDSEntryList & list ) +void ResourceLDAPTDEIO::entries( TDEIO::Job*, const TDEIO::UDSEntryList & list ) { - KIO::UDSEntryListConstIterator it = list.begin(); - KIO::UDSEntryListConstIterator end = list.end(); + TDEIO::UDSEntryListConstIterator it = list.begin(); + TDEIO::UDSEntryListConstIterator end = list.end(); for (; it != end; ++it) { - KIO::UDSEntry::ConstIterator it2 = (*it).begin(); + TDEIO::UDSEntry::ConstIterator it2 = (*it).begin(); for( ; it2 != (*it).end(); it2++ ) { - if ( (*it2).m_uds == KIO::UDS_URL ) { + if ( (*it2).m_uds == TDEIO::UDS_URL ) { KURL tmpurl( (*it2).m_str ); d->mResultDn = tmpurl.path(); kdDebug(7125) << "findUid(): " << d->mResultDn << endl; @@ -147,20 +147,20 @@ void ResourceLDAPKIO::entries( KIO::Job*, const KIO::UDSEntryList & list ) } } -void ResourceLDAPKIO::listResult( KIO::Job *job) +void ResourceLDAPTDEIO::listResult( TDEIO::Job *job) { d->mError = job->error(); - if ( d->mError && d->mError != KIO::ERR_USER_CANCELED ) + if ( d->mError && d->mError != TDEIO::ERR_USER_CANCELED ) mErrorMsg = job->errorString(); else mErrorMsg = ""; tqApp->exit_loop(); } -TQString ResourceLDAPKIO::findUid( const TQString &uid ) +TQString ResourceLDAPTDEIO::findUid( const TQString &uid ) { LDAPUrl url( d->mLDAPUrl ); - KIO::UDSEntry entry; + TDEIO::UDSEntry entry; mErrorMsg = d->mResultDn = ""; @@ -168,21 +168,21 @@ TQString ResourceLDAPKIO::findUid( const TQString &uid ) url.setFilter( "(" + mAttributes[ "uid" ] + "=" + uid + ")" + mFilter ); url.setExtension( "x-dir", "one" ); - kdDebug(7125) << "ResourceLDAPKIO::findUid() uid: " << uid << " url " << + kdDebug(7125) << "ResourceLDAPTDEIO::findUid() uid: " << uid << " url " << url.prettyURL() << endl; - KIO::ListJob * listJob = KIO::listDir( url, false /* no GUI */ ); + TDEIO::ListJob * listJob = TDEIO::listDir( url, false /* no GUI */ ); connect( listJob, - TQT_SIGNAL( entries( KIO::Job *, const KIO::UDSEntryList& ) ), - TQT_SLOT( entries( KIO::Job*, const KIO::UDSEntryList& ) ) ); - connect( listJob, TQT_SIGNAL( result( KIO::Job* ) ), - this, TQT_SLOT( listResult( KIO::Job* ) ) ); + TQT_SIGNAL( entries( TDEIO::Job *, const TDEIO::UDSEntryList& ) ), + TQT_SLOT( entries( TDEIO::Job*, const TDEIO::UDSEntryList& ) ) ); + connect( listJob, TQT_SIGNAL( result( TDEIO::Job* ) ), + this, TQT_SLOT( listResult( TDEIO::Job* ) ) ); enter_loop(); return d->mResultDn; } -TQCString ResourceLDAPKIO::addEntry( const TQString &attr, const TQString &value, bool mod ) +TQCString ResourceLDAPTDEIO::addEntry( const TQString &attr, const TQString &value, bool mod ) { TQCString tmp; if ( !attr.isEmpty() ) { @@ -193,7 +193,7 @@ TQCString ResourceLDAPKIO::addEntry( const TQString &attr, const TQString &value return ( tmp ); } -bool ResourceLDAPKIO::AddresseeToLDIF( TQByteArray &ldif, const Addressee &addr, +bool ResourceLDAPTDEIO::AddresseeToLDIF( TQByteArray &ldif, const Addressee &addr, const TQString &olddn ) { TQCString tmp; @@ -313,14 +313,14 @@ bool ResourceLDAPKIO::AddresseeToLDIF( TQByteArray &ldif, const Addressee &addr, return true; } -void ResourceLDAPKIO::setReadOnly( bool value ) +void ResourceLDAPTDEIO::setReadOnly( bool value ) { //save the original readonly flag, because offline using disables writing d->mReadOnly = true; Resource::setReadOnly( value ); } -void ResourceLDAPKIO::init() +void ResourceLDAPTDEIO::init() { if ( mPort == 0 ) mPort = 389; @@ -417,7 +417,7 @@ void ResourceLDAPKIO::init() kdDebug(7125) << "resource_ldapkio url: " << d->mLDAPUrl.prettyURL() << endl; } -void ResourceLDAPKIO::writeConfig( KConfig *config ) +void ResourceLDAPTDEIO::writeConfig( TDEConfig *config ) { Resource::writeConfig( config ); @@ -450,7 +450,7 @@ void ResourceLDAPKIO::writeConfig( KConfig *config ) config->writeEntry( "LdapAttributes", attributes ); } -Ticket *ResourceLDAPKIO::requestSaveTicket() +Ticket *ResourceLDAPTDEIO::requestSaveTicket() { if ( !addressBook() ) { kdDebug(7125) << "no addressbook" << endl; @@ -460,21 +460,21 @@ Ticket *ResourceLDAPKIO::requestSaveTicket() return createTicket( this ); } -void ResourceLDAPKIO::releaseSaveTicket( Ticket *ticket ) +void ResourceLDAPTDEIO::releaseSaveTicket( Ticket *ticket ) { delete ticket; } -bool ResourceLDAPKIO::doOpen() +bool ResourceLDAPTDEIO::doOpen() { return true; } -void ResourceLDAPKIO::doClose() +void ResourceLDAPTDEIO::doClose() { } -void ResourceLDAPKIO::createCache() +void ResourceLDAPTDEIO::createCache() { d->mTmp = NULL; if ( d->mCachePolicy == Cache_NoConnection && d->mAutoCache ) { @@ -483,7 +483,7 @@ void ResourceLDAPKIO::createCache() } } -void ResourceLDAPKIO::activateCache() +void ResourceLDAPTDEIO::activateCache() { if ( d->mTmp && d->mError == 0 ) { d->mTmp->close(); @@ -495,12 +495,12 @@ void ResourceLDAPKIO::activateCache() } } -KIO::Job *ResourceLDAPKIO::loadFromCache() +TDEIO::Job *ResourceLDAPTDEIO::loadFromCache() { - KIO::Job *job = NULL; + TDEIO::Job *job = NULL; if ( d->mCachePolicy == Cache_Always || ( d->mCachePolicy == Cache_NoConnection && - d->mError == KIO::ERR_COULD_NOT_CONNECT ) ) { + d->mError == TDEIO::ERR_COULD_NOT_CONNECT ) ) { d->mAddr = Addressee(); d->mAd = Address( Address::Home ); @@ -510,17 +510,17 @@ KIO::Job *ResourceLDAPKIO::loadFromCache() Resource::setReadOnly( true ); KURL url( d->mCacheDst ); - job = KIO::get( url, true, false ); - connect( job, TQT_SIGNAL( data( KIO::Job*, const TQByteArray& ) ), - this, TQT_SLOT( data( KIO::Job*, const TQByteArray& ) ) ); + job = TDEIO::get( url, true, false ); + connect( job, TQT_SIGNAL( data( TDEIO::Job*, const TQByteArray& ) ), + this, TQT_SLOT( data( TDEIO::Job*, const TQByteArray& ) ) ); } return job; } -bool ResourceLDAPKIO::load() +bool ResourceLDAPTDEIO::load() { - kdDebug(7125) << "ResourceLDAPKIO::load()" << endl; - KIO::Job *job; + kdDebug(7125) << "ResourceLDAPTDEIO::load()" << endl; + TDEIO::Job *job; clear(); //clear the addressee @@ -534,18 +534,18 @@ bool ResourceLDAPKIO::load() createCache(); if ( d->mCachePolicy != Cache_Always ) { - job = KIO::get( d->mLDAPUrl, true, false ); - connect( job, TQT_SIGNAL( data( KIO::Job*, const TQByteArray& ) ), - this, TQT_SLOT( data( KIO::Job*, const TQByteArray& ) ) ); - connect( job, TQT_SIGNAL( result( KIO::Job* ) ), - this, TQT_SLOT( syncLoadSaveResult( KIO::Job* ) ) ); + job = TDEIO::get( d->mLDAPUrl, true, false ); + connect( job, TQT_SIGNAL( data( TDEIO::Job*, const TQByteArray& ) ), + this, TQT_SLOT( data( TDEIO::Job*, const TQByteArray& ) ) ); + connect( job, TQT_SIGNAL( result( TDEIO::Job* ) ), + this, TQT_SLOT( syncLoadSaveResult( TDEIO::Job* ) ) ); enter_loop(); } job = loadFromCache(); if ( job ) { - connect( job, TQT_SIGNAL( result( KIO::Job* ) ), - this, TQT_SLOT( syncLoadSaveResult( KIO::Job* ) ) ); + connect( job, TQT_SIGNAL( result( TDEIO::Job* ) ), + this, TQT_SLOT( syncLoadSaveResult( TDEIO::Job* ) ) ); enter_loop(); } if ( mErrorMsg.isEmpty() ) { @@ -558,7 +558,7 @@ bool ResourceLDAPKIO::load() } } -bool ResourceLDAPKIO::asyncLoad() +bool ResourceLDAPTDEIO::asyncLoad() { clear(); //clear the addressee @@ -571,18 +571,18 @@ bool ResourceLDAPKIO::asyncLoad() createCache(); if ( d->mCachePolicy != Cache_Always ) { - KIO::Job *job = KIO::get( d->mLDAPUrl, true, false ); - connect( job, TQT_SIGNAL( data( KIO::Job*, const TQByteArray& ) ), - this, TQT_SLOT( data( KIO::Job*, const TQByteArray& ) ) ); - connect( job, TQT_SIGNAL( result( KIO::Job* ) ), - this, TQT_SLOT( result( KIO::Job* ) ) ); + TDEIO::Job *job = TDEIO::get( d->mLDAPUrl, true, false ); + connect( job, TQT_SIGNAL( data( TDEIO::Job*, const TQByteArray& ) ), + this, TQT_SLOT( data( TDEIO::Job*, const TQByteArray& ) ) ); + connect( job, TQT_SIGNAL( result( TDEIO::Job* ) ), + this, TQT_SLOT( result( TDEIO::Job* ) ) ); } else { result( NULL ); } return true; } -void ResourceLDAPKIO::data( KIO::Job *, const TQByteArray &data ) +void ResourceLDAPTDEIO::data( TDEIO::Job *, const TQByteArray &data ) { if ( data.size() ) { d->mLdif.setLDIF( data ); @@ -685,11 +685,11 @@ void ResourceLDAPKIO::data( KIO::Job *, const TQByteArray &data ) } while ( ret != LDIF::MoreData ); } -void ResourceLDAPKIO::loadCacheResult( KIO::Job *job ) +void ResourceLDAPTDEIO::loadCacheResult( TDEIO::Job *job ) { mErrorMsg = ""; d->mError = job->error(); - if ( d->mError && d->mError != KIO::ERR_USER_CANCELED ) { + if ( d->mError && d->mError != TDEIO::ERR_USER_CANCELED ) { mErrorMsg = job->errorString(); } if ( !mErrorMsg.isEmpty() ) @@ -698,12 +698,12 @@ void ResourceLDAPKIO::loadCacheResult( KIO::Job *job ) emit loadingFinished( this ); } -void ResourceLDAPKIO::result( KIO::Job *job ) +void ResourceLDAPTDEIO::result( TDEIO::Job *job ) { mErrorMsg = ""; if ( job ) { d->mError = job->error(); - if ( d->mError && d->mError != KIO::ERR_USER_CANCELED ) { + if ( d->mError && d->mError != TDEIO::ERR_USER_CANCELED ) { mErrorMsg = job->errorString(); } } else { @@ -711,11 +711,11 @@ void ResourceLDAPKIO::result( KIO::Job *job ) } activateCache(); - KIO::Job *cjob; + TDEIO::Job *cjob; cjob = loadFromCache(); if ( cjob ) { - connect( cjob, TQT_SIGNAL( result( KIO::Job* ) ), - this, TQT_SLOT( loadCacheResult( KIO::Job* ) ) ); + connect( cjob, TQT_SIGNAL( result( TDEIO::Job* ) ), + this, TQT_SLOT( loadCacheResult( TDEIO::Job* ) ) ); } else { if ( !mErrorMsg.isEmpty() ) emit loadingError( this, mErrorMsg ); @@ -724,16 +724,16 @@ void ResourceLDAPKIO::result( KIO::Job *job ) } } -bool ResourceLDAPKIO::save( Ticket* ) +bool ResourceLDAPTDEIO::save( Ticket* ) { kdDebug(7125) << "ResourceLDAPKIO save" << endl; d->mSaveIt = begin(); - KIO::Job *job = KIO::put( d->mLDAPUrl, -1, true, false, false ); - connect( job, TQT_SIGNAL( dataReq( KIO::Job*, TQByteArray& ) ), - this, TQT_SLOT( saveData( KIO::Job*, TQByteArray& ) ) ); - connect( job, TQT_SIGNAL( result( KIO::Job* ) ), - this, TQT_SLOT( syncLoadSaveResult( KIO::Job* ) ) ); + TDEIO::Job *job = TDEIO::put( d->mLDAPUrl, -1, true, false, false ); + connect( job, TQT_SIGNAL( dataReq( TDEIO::Job*, TQByteArray& ) ), + this, TQT_SLOT( saveData( TDEIO::Job*, TQByteArray& ) ) ); + connect( job, TQT_SIGNAL( result( TDEIO::Job* ) ), + this, TQT_SLOT( syncLoadSaveResult( TDEIO::Job* ) ) ); enter_loop(); if ( mErrorMsg.isEmpty() ) { kdDebug(7125) << "ResourceLDAPKIO save ok!" << endl; @@ -745,22 +745,22 @@ bool ResourceLDAPKIO::save( Ticket* ) } } -bool ResourceLDAPKIO::asyncSave( Ticket* ) +bool ResourceLDAPTDEIO::asyncSave( Ticket* ) { kdDebug(7125) << "ResourceLDAPKIO asyncSave" << endl; d->mSaveIt = begin(); - KIO::Job *job = KIO::put( d->mLDAPUrl, -1, true, false, false ); - connect( job, TQT_SIGNAL( dataReq( KIO::Job*, TQByteArray& ) ), - this, TQT_SLOT( saveData( KIO::Job*, TQByteArray& ) ) ); - connect( job, TQT_SIGNAL( result( KIO::Job* ) ), - this, TQT_SLOT( saveResult( KIO::Job* ) ) ); + TDEIO::Job *job = TDEIO::put( d->mLDAPUrl, -1, true, false, false ); + connect( job, TQT_SIGNAL( dataReq( TDEIO::Job*, TQByteArray& ) ), + this, TQT_SLOT( saveData( TDEIO::Job*, TQByteArray& ) ) ); + connect( job, TQT_SIGNAL( result( TDEIO::Job* ) ), + this, TQT_SLOT( saveResult( TDEIO::Job* ) ) ); return true; } -void ResourceLDAPKIO::syncLoadSaveResult( KIO::Job *job ) +void ResourceLDAPTDEIO::syncLoadSaveResult( TDEIO::Job *job ) { d->mError = job->error(); - if ( d->mError && d->mError != KIO::ERR_USER_CANCELED ) + if ( d->mError && d->mError != TDEIO::ERR_USER_CANCELED ) mErrorMsg = job->errorString(); else mErrorMsg = ""; @@ -769,16 +769,16 @@ void ResourceLDAPKIO::syncLoadSaveResult( KIO::Job *job ) tqApp->exit_loop(); } -void ResourceLDAPKIO::saveResult( KIO::Job *job ) +void ResourceLDAPTDEIO::saveResult( TDEIO::Job *job ) { d->mError = job->error(); - if ( d->mError && d->mError != KIO::ERR_USER_CANCELED ) + if ( d->mError && d->mError != TDEIO::ERR_USER_CANCELED ) emit savingError( this, job->errorString() ); else emit savingFinished( this ); } -void ResourceLDAPKIO::saveData( KIO::Job*, TQByteArray& data ) +void ResourceLDAPTDEIO::saveData( TDEIO::Job*, TQByteArray& data ) { while ( d->mSaveIt != end() && !(*d->mSaveIt).changed() ) d->mSaveIt++; @@ -799,7 +799,7 @@ void ResourceLDAPKIO::saveData( KIO::Job*, TQByteArray& data ) d->mSaveIt++; } -void ResourceLDAPKIO::removeAddressee( const Addressee& addr ) +void ResourceLDAPTDEIO::removeAddressee( const Addressee& addr ) { TQString dn = findUid( addr.uid() ); @@ -815,7 +815,7 @@ void ResourceLDAPKIO::removeAddressee( const Addressee& addr ) url.setPath( "/" + dn ); url.setExtension( "x-dir", "base" ); url.setScope( LDAPUrl::Base ); - if ( KIO::NetAccess::del( url, NULL ) ) mAddrMap.erase( addr.uid() ); + if ( TDEIO::NetAccess::del( url, NULL ) ) mAddrMap.erase( addr.uid() ); } else { //maybe it's not saved yet mAddrMap.erase( addr.uid() ); @@ -823,216 +823,216 @@ void ResourceLDAPKIO::removeAddressee( const Addressee& addr ) } -void ResourceLDAPKIO::setUser( const TQString &user ) +void ResourceLDAPTDEIO::setUser( const TQString &user ) { mUser = user; } -TQString ResourceLDAPKIO::user() const +TQString ResourceLDAPTDEIO::user() const { return mUser; } -void ResourceLDAPKIO::setPassword( const TQString &password ) +void ResourceLDAPTDEIO::setPassword( const TQString &password ) { mPassword = password; } -TQString ResourceLDAPKIO::password() const +TQString ResourceLDAPTDEIO::password() const { return mPassword; } -void ResourceLDAPKIO::setDn( const TQString &dn ) +void ResourceLDAPTDEIO::setDn( const TQString &dn ) { mDn = dn; } -TQString ResourceLDAPKIO::dn() const +TQString ResourceLDAPTDEIO::dn() const { return mDn; } -void ResourceLDAPKIO::setHost( const TQString &host ) +void ResourceLDAPTDEIO::setHost( const TQString &host ) { mHost = host; } -TQString ResourceLDAPKIO::host() const +TQString ResourceLDAPTDEIO::host() const { return mHost; } -void ResourceLDAPKIO::setPort( int port ) +void ResourceLDAPTDEIO::setPort( int port ) { mPort = port; } -int ResourceLDAPKIO::port() const +int ResourceLDAPTDEIO::port() const { return mPort; } -void ResourceLDAPKIO::setVer( int ver ) +void ResourceLDAPTDEIO::setVer( int ver ) { d->mVer = ver; } -int ResourceLDAPKIO::ver() const +int ResourceLDAPTDEIO::ver() const { return d->mVer; } -void ResourceLDAPKIO::setSizeLimit( int sizelimit ) +void ResourceLDAPTDEIO::setSizeLimit( int sizelimit ) { d->mSizeLimit = sizelimit; } -int ResourceLDAPKIO::sizeLimit() +int ResourceLDAPTDEIO::sizeLimit() { return d->mSizeLimit; } -void ResourceLDAPKIO::setTimeLimit( int timelimit ) +void ResourceLDAPTDEIO::setTimeLimit( int timelimit ) { d->mTimeLimit = timelimit; } -int ResourceLDAPKIO::timeLimit() +int ResourceLDAPTDEIO::timeLimit() { return d->mTimeLimit; } -void ResourceLDAPKIO::setFilter( const TQString &filter ) +void ResourceLDAPTDEIO::setFilter( const TQString &filter ) { mFilter = filter; } -TQString ResourceLDAPKIO::filter() const +TQString ResourceLDAPTDEIO::filter() const { return mFilter; } -void ResourceLDAPKIO::setIsAnonymous( bool value ) +void ResourceLDAPTDEIO::setIsAnonymous( bool value ) { mAnonymous = value; } -bool ResourceLDAPKIO::isAnonymous() const +bool ResourceLDAPTDEIO::isAnonymous() const { return mAnonymous; } -void ResourceLDAPKIO::setIsTLS( bool value ) +void ResourceLDAPTDEIO::setIsTLS( bool value ) { d->mTLS = value; } -bool ResourceLDAPKIO::isTLS() const +bool ResourceLDAPTDEIO::isTLS() const { return d->mTLS; } -void ResourceLDAPKIO::setIsSSL( bool value ) +void ResourceLDAPTDEIO::setIsSSL( bool value ) { d->mSSL = value; } -bool ResourceLDAPKIO::isSSL() const +bool ResourceLDAPTDEIO::isSSL() const { return d->mSSL; } -void ResourceLDAPKIO::setIsSubTree( bool value ) +void ResourceLDAPTDEIO::setIsSubTree( bool value ) { d->mSubTree = value; } -bool ResourceLDAPKIO::isSubTree() const +bool ResourceLDAPTDEIO::isSubTree() const { return d->mSubTree; } -void ResourceLDAPKIO::setAttributes( const TQMap<TQString, TQString> &attributes ) +void ResourceLDAPTDEIO::setAttributes( const TQMap<TQString, TQString> &attributes ) { mAttributes = attributes; } -TQMap<TQString, TQString> ResourceLDAPKIO::attributes() const +TQMap<TQString, TQString> ResourceLDAPTDEIO::attributes() const { return mAttributes; } -void ResourceLDAPKIO::setRDNPrefix( int value ) +void ResourceLDAPTDEIO::setRDNPrefix( int value ) { d->mRDNPrefix = value; } -int ResourceLDAPKIO::RDNPrefix() const +int ResourceLDAPTDEIO::RDNPrefix() const { return d->mRDNPrefix; } -void ResourceLDAPKIO::setIsSASL( bool value ) +void ResourceLDAPTDEIO::setIsSASL( bool value ) { d->mSASL = value; } -bool ResourceLDAPKIO::isSASL() const +bool ResourceLDAPTDEIO::isSASL() const { return d->mSASL; } -void ResourceLDAPKIO::setMech( const TQString &mech ) +void ResourceLDAPTDEIO::setMech( const TQString &mech ) { d->mMech = mech; } -TQString ResourceLDAPKIO::mech() const +TQString ResourceLDAPTDEIO::mech() const { return d->mMech; } -void ResourceLDAPKIO::setRealm( const TQString &realm ) +void ResourceLDAPTDEIO::setRealm( const TQString &realm ) { d->mRealm = realm; } -TQString ResourceLDAPKIO::realm() const +TQString ResourceLDAPTDEIO::realm() const { return d->mRealm; } -void ResourceLDAPKIO::setBindDN( const TQString &binddn ) +void ResourceLDAPTDEIO::setBindDN( const TQString &binddn ) { d->mBindDN = binddn; } -TQString ResourceLDAPKIO::bindDN() const +TQString ResourceLDAPTDEIO::bindDN() const { return d->mBindDN; } -void ResourceLDAPKIO::setCachePolicy( int pol ) +void ResourceLDAPTDEIO::setCachePolicy( int pol ) { d->mCachePolicy = pol; } -int ResourceLDAPKIO::cachePolicy() const +int ResourceLDAPTDEIO::cachePolicy() const { return d->mCachePolicy; } -void ResourceLDAPKIO::setAutoCache( bool value ) +void ResourceLDAPTDEIO::setAutoCache( bool value ) { d->mAutoCache = value; } -bool ResourceLDAPKIO::autoCache() +bool ResourceLDAPTDEIO::autoCache() { return d->mAutoCache; } -TQString ResourceLDAPKIO::cacheDst() const +TQString ResourceLDAPTDEIO::cacheDst() const { return d->mCacheDst; } diff --git a/kabc/plugins/ldapkio/resourceldapkio.h b/kabc/plugins/ldapkio/resourceldapkio.h index 2b5685fdc..8519955da 100644 --- a/kabc/plugins/ldapkio/resourceldapkio.h +++ b/kabc/plugins/ldapkio/resourceldapkio.h @@ -26,7 +26,7 @@ #include <kabc/ldif.h> #include <kio/job.h> -class KConfig; +class TDEConfig; namespace KABC { @@ -37,14 +37,14 @@ class KABC_EXPORT ResourceLDAPKIO : public Resource public: enum CachePolicy{ Cache_No, Cache_NoConnection, Cache_Always }; - ResourceLDAPKIO( const KConfig* ); + ResourceLDAPKIO( const TDEConfig* ); virtual ~ResourceLDAPKIO(); /** * Call this after you used one of the set... methods */ virtual void init(); - virtual void writeConfig( KConfig* ); + virtual void writeConfig( TDEConfig* ); virtual bool doOpen(); virtual void doClose(); @@ -128,14 +128,14 @@ class KABC_EXPORT ResourceLDAPKIO : public Resource TQString cacheDst() const; protected slots: - void entries( KIO::Job*, const KIO::UDSEntryList& ); - void data( KIO::Job*, const TQByteArray& ); - void result( KIO::Job* ); - void listResult( KIO::Job* ); - void syncLoadSaveResult( KIO::Job* ); - void saveResult( KIO::Job* ); - void saveData( KIO::Job*, TQByteArray& ); - void loadCacheResult( KIO::Job* ); + void entries( TDEIO::Job*, const TDEIO::UDSEntryList& ); + void data( TDEIO::Job*, const TQByteArray& ); + void result( TDEIO::Job* ); + void listResult( TDEIO::Job* ); + void syncLoadSaveResult( TDEIO::Job* ); + void saveResult( TDEIO::Job* ); + void saveData( TDEIO::Job*, TQByteArray& ); + void loadCacheResult( TDEIO::Job* ); private: TQString mUser; @@ -151,9 +151,9 @@ protected slots: int mGetCounter; //KDE 4: remove bool mErrorOccured; //KDE 4: remove TQString mErrorMsg; - TQMap<KIO::Job*, TQByteArray> mJobMap; //KDE 4: remove + TQMap<TDEIO::Job*, TQByteArray> mJobMap; //KDE 4: remove - KIO::Job *loadFromCache(); + TDEIO::Job *loadFromCache(); void createCache(); void activateCache(); void enter_loop(); diff --git a/kabc/plugins/ldapkio/resourceldapkioconfig.cpp b/kabc/plugins/ldapkio/resourceldapkioconfig.cpp index 271328525..7ecd14554 100644 --- a/kabc/plugins/ldapkio/resourceldapkioconfig.cpp +++ b/kabc/plugins/ldapkio/resourceldapkioconfig.cpp @@ -378,7 +378,7 @@ int OfflineDialog::cachePolicy() const void OfflineDialog::loadCache() { - if ( KIO::NetAccess::download( mSrc, mDst, this ) ) { + if ( TDEIO::NetAccess::download( mSrc, mDst, this ) ) { KMessageBox::information( this, i18n("Successfully downloaded directory server contents!") ); } else { diff --git a/kabc/plugins/net/resourcenet.cpp b/kabc/plugins/net/resourcenet.cpp index 914885877..78fb16256 100644 --- a/kabc/plugins/net/resourcenet.cpp +++ b/kabc/plugins/net/resourcenet.cpp @@ -40,16 +40,16 @@ using namespace KABC; class ResourceNet::ResourceNetPrivate { public: - KIO::Job *mLoadJob; + TDEIO::Job *mLoadJob; bool mIsLoading; - KIO::Job *mSaveJob; + TDEIO::Job *mSaveJob; bool mIsSaving; TQString mLastErrorString; }; -ResourceNet::ResourceNet( const KConfig *config ) +ResourceNet::ResourceNet( const TDEConfig *config ) : Resource( config ), mFormat( 0 ), mTempFile( 0 ), d( new ResourceNetPrivate ) @@ -104,7 +104,7 @@ ResourceNet::~ResourceNet() deleteLocalTempFile(); } -void ResourceNet::writeConfig( KConfig *config ) +void ResourceNet::writeConfig( TDEConfig *config ) { Resource::writeConfig( config ); @@ -137,7 +137,7 @@ bool ResourceNet::load() { TQString tempFile; - if ( !KIO::NetAccess::download( mUrl, tempFile, 0 ) ) { + if ( !TDEIO::NetAccess::download( mUrl, tempFile, 0 ) ) { addressBook()->error( i18n( "Unable to download file '%1'." ).arg( mUrl.prettyURL() ) ); return false; } @@ -145,7 +145,7 @@ bool ResourceNet::load() TQFile file( tempFile ); if ( !file.open( IO_ReadOnly ) ) { addressBook()->error( i18n( "Unable to open file '%1'." ).arg( tempFile ) ); - KIO::NetAccess::removeTempFile( tempFile ); + TDEIO::NetAccess::removeTempFile( tempFile ); return false; } @@ -153,7 +153,7 @@ bool ResourceNet::load() if ( !result ) addressBook()->error( i18n( "Problems during parsing file '%1'." ).arg( tempFile ) ); - KIO::NetAccess::removeTempFile( tempFile ); + TDEIO::NetAccess::removeTempFile( tempFile ); return result; } @@ -189,11 +189,11 @@ bool ResourceNet::asyncLoad() KURL dest; dest.setPath( mTempFile->name() ); - KIO::Scheduler::checkSlaveOnHold( true ); - d->mLoadJob = KIO::file_copy( mUrl, dest, -1, true, false, false ); + TDEIO::Scheduler::checkSlaveOnHold( true ); + d->mLoadJob = TDEIO::file_copy( mUrl, dest, -1, true, false, false ); d->mIsLoading = true; - connect( d->mLoadJob, TQT_SIGNAL( result( KIO::Job* ) ), - this, TQT_SLOT( downloadFinished( KIO::Job* ) ) ); + connect( d->mLoadJob, TQT_SIGNAL( result( TDEIO::Job* ) ), + this, TQT_SLOT( downloadFinished( TDEIO::Job* ) ) ); return true; } @@ -247,7 +247,7 @@ bool ResourceNet::save( Ticket* ) return false; } - ok = KIO::NetAccess::upload( tempFile.name(), mUrl, 0 ); + ok = TDEIO::NetAccess::upload( tempFile.name(), mUrl, 0 ); if ( !ok ) addressBook()->error( i18n( "Unable to upload to '%1'." ).arg( mUrl.prettyURL() ) ); @@ -283,11 +283,11 @@ bool ResourceNet::asyncSave( Ticket* ) KURL src; src.setPath( mTempFile->name() ); - KIO::Scheduler::checkSlaveOnHold( true ); + TDEIO::Scheduler::checkSlaveOnHold( true ); d->mIsSaving = true; - d->mSaveJob = KIO::file_copy( src, mUrl, -1, true, false, false ); - connect( d->mSaveJob, TQT_SIGNAL( result( KIO::Job* ) ), - this, TQT_SLOT( uploadFinished( KIO::Job* ) ) ); + d->mSaveJob = TDEIO::file_copy( src, mUrl, -1, true, false, false ); + connect( d->mSaveJob, TQT_SIGNAL( result( TDEIO::Job* ) ), + this, TQT_SLOT( uploadFinished( TDEIO::Job* ) ) ); return true; } @@ -344,7 +344,7 @@ TQString ResourceNet::format() const return mFormatName; } -void ResourceNet::downloadFinished( KIO::Job* ) +void ResourceNet::downloadFinished( TDEIO::Job* ) { kdDebug(5700) << "ResourceNet::downloadFinished()" << endl; @@ -370,7 +370,7 @@ void ResourceNet::downloadFinished( KIO::Job* ) deleteLocalTempFile(); } -void ResourceNet::uploadFinished( KIO::Job *job ) +void ResourceNet::uploadFinished( TDEIO::Job *job ) { kdDebug(5700) << "ResourceFile::uploadFinished()" << endl; diff --git a/kabc/plugins/net/resourcenet.h b/kabc/plugins/net/resourcenet.h index 326c3780b..a13bfa175 100644 --- a/kabc/plugins/net/resourcenet.h +++ b/kabc/plugins/net/resourcenet.h @@ -31,7 +31,7 @@ class TQFile; class TQTimer; class KTempFile; -namespace KIO { +namespace TDEIO { class Job; } @@ -47,11 +47,11 @@ class KABC_EXPORT ResourceNet : public Resource Q_OBJECT public: - ResourceNet( const KConfig* ); + ResourceNet( const TDEConfig* ); ResourceNet( const KURL &url, const TQString &format ); ~ResourceNet(); - virtual void writeConfig( KConfig* ); + virtual void writeConfig( TDEConfig* ); virtual bool doOpen(); virtual void doClose(); @@ -88,8 +88,8 @@ class KABC_EXPORT ResourceNet : public Resource void init( const KURL &url, const TQString &format ); private slots: - void downloadFinished( KIO::Job* ); - void uploadFinished( KIO::Job* ); + void downloadFinished( TDEIO::Job* ); + void uploadFinished( TDEIO::Job* ); void signalError(); private: diff --git a/kabc/plugins/sql/resourcesql.cpp b/kabc/plugins/sql/resourcesql.cpp index 55f02bae7..150fe54eb 100644 --- a/kabc/plugins/sql/resourcesql.cpp +++ b/kabc/plugins/sql/resourcesql.cpp @@ -39,7 +39,7 @@ extern "C" } } -ResourceSql::ResourceSql( AddressBook *ab, const KConfig *config ) +ResourceSql::ResourceSql( AddressBook *ab, const TDEConfig *config ) : Resource( ab ), mDb( 0 ) { TQString user, password, db, host; diff --git a/kabc/plugins/sql/resourcesql.h b/kabc/plugins/sql/resourcesql.h index 80ebf9e7a..9f1201844 100644 --- a/kabc/plugins/sql/resourcesql.h +++ b/kabc/plugins/sql/resourcesql.h @@ -35,7 +35,7 @@ class ResourceSql : public Resource public: ResourceSql( AddressBook *ab, const TQString &user, const TQString &password, const TQString &db, const TQString &host ); - ResourceSql( AddressBook *ab, const KConfig * ); + ResourceSql( AddressBook *ab, const TDEConfig * ); bool open(); void close(); diff --git a/kabc/plugins/sql/resourcesqlconfig.cpp b/kabc/plugins/sql/resourcesqlconfig.cpp index ef1651cde..f62890c3d 100644 --- a/kabc/plugins/sql/resourcesqlconfig.cpp +++ b/kabc/plugins/sql/resourcesqlconfig.cpp @@ -74,7 +74,7 @@ ResourceSqlConfig::ResourceSqlConfig( TQWidget* parent, const char* name ) mainLayout->addWidget( mDbName, 4, 1 ); } -void ResourceSqlConfig::loadSettings( KConfig *config ) +void ResourceSqlConfig::loadSettings( TDEConfig *config ) { mUser->setText( config->readEntry( "SqlUser" ) ); mPassword->setText( KABC::Resource::cryptStr( config->readEntry( "SqlPassword" ) ) ); @@ -83,7 +83,7 @@ void ResourceSqlConfig::loadSettings( KConfig *config ) mPort->setValue( config->readNumEntry( "SqlPort" ) ); } -void ResourceSqlConfig::saveSettings( KConfig *config ) +void ResourceSqlConfig::saveSettings( TDEConfig *config ) { config->writeEntry( "SqlUser", mUser->text() ); config->writeEntry( "SqlPassword", KABC::Resource::cryptStr( mPassword->text() ) ); diff --git a/kabc/plugins/sql/resourcesqlconfig.h b/kabc/plugins/sql/resourcesqlconfig.h index 7bd27d969..ae2de7d6d 100644 --- a/kabc/plugins/sql/resourcesqlconfig.h +++ b/kabc/plugins/sql/resourcesqlconfig.h @@ -36,8 +36,8 @@ public: ResourceSqlConfig( TQWidget* parent = 0, const char* name = 0 ); public slots: - void loadSettings( KConfig *config ); - void saveSettings( KConfig *config ); + void loadSettings( TDEConfig *config ); + void saveSettings( TDEConfig *config ); private: KLineEdit* mUser; diff --git a/kabc/resource.cpp b/kabc/resource.cpp index d43c68320..57c8588e8 100644 --- a/kabc/resource.cpp +++ b/kabc/resource.cpp @@ -197,7 +197,7 @@ bool Resource::ConstIterator::operator!=( const ConstIterator &it ) } -Resource::Resource( const KConfig *config ) +Resource::Resource( const TDEConfig *config ) : KRES::Resource( config ), mAddressBook( 0 ) { } @@ -236,7 +236,7 @@ Resource::ConstIterator Resource::end() const return it; } -void Resource::writeConfig( KConfig *config ) +void Resource::writeConfig( TDEConfig *config ) { KRES::Resource::writeConfig( config ); } diff --git a/kabc/resource.h b/kabc/resource.h index 0412a22b1..4824ffda8 100644 --- a/kabc/resource.h +++ b/kabc/resource.h @@ -118,7 +118,7 @@ class KABC_EXPORT Resource : public KRES::Resource @param config The config object where the derived classes can read out their settings. */ - Resource( const KConfig *config ); + Resource( const TDEConfig *config ); /** Destructor. @@ -157,7 +157,7 @@ class KABC_EXPORT Resource : public KRES::Resource /** Writes the resource specific config to file. */ - virtual void writeConfig( KConfig *config ); + virtual void writeConfig( TDEConfig *config ); /** Request a ticket, you have to pass through save() to diff --git a/kabc/scripts/field.src.cpp b/kabc/scripts/field.src.cpp index b0704e393..6362d223c 100644 --- a/kabc/scripts/field.src.cpp +++ b/kabc/scripts/field.src.cpp @@ -428,13 +428,13 @@ void Field::deleteFields() void Field::saveFields( const TQString &identifier, const Field::List &fields ) { - KConfig *cfg = TDEGlobal::config(); - KConfigGroupSaver( cfg, "KABCFields" ); + TDEConfig *cfg = TDEGlobal::config(); + TDEConfigGroupSaver( cfg, "KABCFields" ); saveFields( cfg, identifier, fields ); } -void Field::saveFields( KConfig *cfg, const TQString &identifier, +void Field::saveFields( TDEConfig *cfg, const TQString &identifier, const Field::List &fields ) { TQValueList<int> fieldIds; @@ -458,13 +458,13 @@ void Field::saveFields( KConfig *cfg, const TQString &identifier, Field::List Field::restoreFields( const TQString &identifier ) { - KConfig *cfg = TDEGlobal::config(); - KConfigGroupSaver( cfg, "KABCFields" ); + TDEConfig *cfg = TDEGlobal::config(); + TDEConfigGroupSaver( cfg, "KABCFields" ); return restoreFields( cfg, identifier ); } -Field::List Field::restoreFields( KConfig *cfg, const TQString &identifier ) +Field::List Field::restoreFields( TDEConfig *cfg, const TQString &identifier ) { const TQValueList<int> fieldIds = cfg->readIntListEntry( identifier ); diff --git a/kabc/sound.h b/kabc/sound.h index 133c0facb..98dcf320b 100644 --- a/kabc/sound.h +++ b/kabc/sound.h @@ -40,10 +40,10 @@ namespace KABC { * KAudioPlayer::play( tmp.name() ); * } else if(!sound.url().isEmpty()) { * TQString tmpFile; - * if(!KIO::NetAccess::download(KURL(themeURL.url()), tmpFile, NULL)) + * if(!TDEIO::NetAccess::download(KURL(themeURL.url()), tmpFile, NULL)) * { * KMessageBox::error(0L, - * KIO::NetAccess::lastErrorString(), + * TDEIO::NetAccess::lastErrorString(), * i18n("Failed to download sound file"), * KMessageBox::Notify * ); diff --git a/kabc/stdaddressbook.cpp b/kabc/stdaddressbook.cpp index 6b574d86f..1cf436455 100644 --- a/kabc/stdaddressbook.cpp +++ b/kabc/stdaddressbook.cpp @@ -188,7 +188,7 @@ bool StdAddressBook::automaticSave() // should get const for 4.X Addressee StdAddressBook::whoAmI() { - KConfig config( "kabcrc" ); + TDEConfig config( "kabcrc" ); config.setGroup( "General" ); return findByUid( config.readEntry( "WhoAmI" ) ); @@ -196,7 +196,7 @@ Addressee StdAddressBook::whoAmI() void StdAddressBook::setWhoAmI( const Addressee &addr ) { - KConfig config( "kabcrc" ); + TDEConfig config( "kabcrc" ); config.setGroup( "General" ); config.writeEntry( "WhoAmI", addr.uid() ); |