From f9ced3b3f13f3136ef63c33ef163042010d6e80b Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Fri, 25 Jan 2013 00:39:24 -0600 Subject: Rename KCModule, KConfig, KIO, KServer, and KSocket to avoid conflicts with KDE4 --- lib/compatibility/knewstuff/downloaddialog.cpp | 26 +++++++------- lib/compatibility/knewstuff/downloaddialog.h | 12 +++---- lib/compatibility/knewstuff/engine.cpp | 46 ++++++++++++------------- lib/compatibility/knewstuff/engine.h | 18 +++++----- lib/compatibility/knewstuff/knewstuffgeneric.h | 4 +-- lib/compatibility/knewstuff/knewstuffsecure.cpp | 10 +++--- lib/compatibility/knewstuff/provider.cpp | 16 ++++----- lib/compatibility/knewstuff/provider.h | 6 ++-- lib/compatibility/knewstuff/uploaddialog.cpp | 4 +-- 9 files changed, 71 insertions(+), 71 deletions(-) (limited to 'lib/compatibility/knewstuff') diff --git a/lib/compatibility/knewstuff/downloaddialog.cpp b/lib/compatibility/knewstuff/downloaddialog.cpp index d2516134..c5f402e1 100644 --- a/lib/compatibility/knewstuff/downloaddialog.cpp +++ b/lib/compatibility/knewstuff/downloaddialog.cpp @@ -195,7 +195,7 @@ void DownloadDialog::addProvider(Provider *p) ret = true; if(!p->icon().isValid()) ret = false; - else ret = KIO::NetAccess::download(p->icon(), tmp, this); + else ret = TDEIO::NetAccess::download(p->icon(), tmp, this); if(ret) pix = TQPixmap(tmp); else pix = TDEGlobal::iconLoader()->loadIcon("knewstuff", KIcon::Panel); frame = addPage(p->name(), p->name(), pix); @@ -280,7 +280,7 @@ void DownloadDialog::addProvider(Provider *p) TQTimer::singleShot(100, this, TQT_SLOT(slotFinish())); } -void DownloadDialog::slotResult(KIO::Job *job) +void DownloadDialog::slotResult(TDEIO::Job *job) { TQDomDocument dom; TQDomElement knewstuff; @@ -379,7 +379,7 @@ void DownloadDialog::addEntry(Entry *entry) kdDebug() << "added entry " << entry->name() << endl; } -void DownloadDialog::slotData(KIO::Job *job, const TQByteArray &a) +void DownloadDialog::slotData(TDEIO::Job *job, const TQByteArray &a) { TQCString tmp(a, a.size() + 1); m_data[job].append(TQString::fromUtf8(tmp)); @@ -446,8 +446,8 @@ void DownloadDialog::slotInstall() KURL source = e->payload(); KURL dest = KURL(m_s->downloadDestination(e)); - KIO::FileCopyJob *job = KIO::file_copy(source, dest, -1, true); - connect(job, TQT_SIGNAL(result(KIO::Job*)), TQT_SLOT(slotInstalled(KIO::Job*))); + TDEIO::FileCopyJob *job = TDEIO::file_copy(source, dest, -1, true); + connect(job, TQT_SIGNAL(result(TDEIO::Job*)), TQT_SLOT(slotInstalled(TDEIO::Job*))); } } @@ -471,14 +471,14 @@ void DownloadDialog::install(Entry *e) if(in) in->setEnabled(false); } -void DownloadDialog::slotInstalled(KIO::Job *job) +void DownloadDialog::slotInstalled(TDEIO::Job *job) { bool ret = (job->error() == 0); - KIO::FileCopyJob *cjob; + TDEIO::FileCopyJob *cjob; if(ret) { - cjob = static_cast(job); + cjob = static_cast(job); if(cjob) { ret = m_s->install(cjob->destURL().path()); @@ -519,7 +519,7 @@ void DownloadDialog::slotSelected() } else { - KIO::NetAccess::download(e->preview(lang), tmp, this); + TDEIO::NetAccess::download(e->preview(lang), tmp, this); m_rt->setText(TQString("%1
%2
%3


%5
(%6)").arg( e->name()).arg(e->author()).arg(TDEGlobal::locale()->formatDate(e->releaseDate())).arg(tmp).arg(e->summary(lang)).arg(e->license())); } @@ -585,13 +585,13 @@ void DownloadDialog::slotPage(TQWidget *w) void DownloadDialog::loadProvider(Provider *p) { - KIO::TransferJob *job = KIO::get(p->downloadUrl()); + TDEIO::TransferJob *job = TDEIO::get(p->downloadUrl()); m_jobs[job] = p; - connect(job, TQT_SIGNAL(result(KIO::Job*)), TQT_SLOT(slotResult(KIO::Job*))); - connect(job, TQT_SIGNAL(data(KIO::Job*, const TQByteArray&)), - TQT_SLOT(slotData(KIO::Job*, const TQByteArray&))); + connect(job, TQT_SIGNAL(result(TDEIO::Job*)), TQT_SLOT(slotResult(TDEIO::Job*))); + connect(job, TQT_SIGNAL(data(TDEIO::Job*, const TQByteArray&)), + TQT_SLOT(slotData(TDEIO::Job*, const TQByteArray&))); } void DownloadDialog::setType(TQString type) diff --git a/lib/compatibility/knewstuff/downloaddialog.h b/lib/compatibility/knewstuff/downloaddialog.h index 2a0b729d..3c7257d7 100644 --- a/lib/compatibility/knewstuff/downloaddialog.h +++ b/lib/compatibility/knewstuff/downloaddialog.h @@ -23,7 +23,7 @@ #include #include -namespace KIO +namespace TDEIO { class Job; } @@ -193,11 +193,11 @@ class KDE_EXPORT DownloadDialog : public KDialogBase void slotOk(); private slots: - void slotResult(KIO::Job *job); - void slotData(KIO::Job *job, const TQByteArray &a); + void slotResult(TDEIO::Job *job); + void slotData(TDEIO::Job *job, const TQByteArray &a); void slotInstall(); void slotDetails(); - void slotInstalled(KIO::Job *job); + void slotInstalled(TDEIO::Job *job); void slotTab(int tab); void slotSelected(); void slotPage(TQWidget *w); @@ -224,8 +224,8 @@ class KDE_EXPORT DownloadDialog : public KDialogBase TQMap m_providers; TQMap m_rts; TQMap* > m_buttons; - TQMap m_jobs; - TQMap m_data; + TQMap m_jobs; + TQMap m_data; TQString m_filter; TQString m_providerlist; Engine *m_engine; diff --git a/lib/compatibility/knewstuff/engine.cpp b/lib/compatibility/knewstuff/engine.cpp index ca63ea98..2abb7bca 100644 --- a/lib/compatibility/knewstuff/engine.cpp +++ b/lib/compatibility/knewstuff/engine.cpp @@ -96,18 +96,18 @@ void Engine::getMetaInformation( Provider::List *providers ) for ( p = providers->first(); p; p = providers->next() ) { if ( p->downloadUrl().isEmpty() ) continue; - KIO::TransferJob *job = KIO::get( p->downloadUrl() ); - connect( job, TQT_SIGNAL( result( KIO::Job * ) ), - TQT_SLOT( slotNewStuffJobResult( KIO::Job * ) ) ); - connect( job, TQT_SIGNAL( data( KIO::Job *, const TQByteArray & ) ), - TQT_SLOT( slotNewStuffJobData( KIO::Job *, const TQByteArray & ) ) ); + TDEIO::TransferJob *job = TDEIO::get( p->downloadUrl() ); + connect( job, TQT_SIGNAL( result( TDEIO::Job * ) ), + TQT_SLOT( slotNewStuffJobResult( TDEIO::Job * ) ) ); + connect( job, TQT_SIGNAL( data( TDEIO::Job *, const TQByteArray & ) ), + TQT_SLOT( slotNewStuffJobData( TDEIO::Job *, const TQByteArray & ) ) ); mNewStuffJobData.insert( job, "" ); mProviderJobs[ job ] = p; } } -void Engine::slotNewStuffJobData( KIO::Job *job, const TQByteArray &data ) +void Engine::slotNewStuffJobData( TDEIO::Job *job, const TQByteArray &data ) { if ( data.isEmpty() ) return; @@ -118,7 +118,7 @@ void Engine::slotNewStuffJobData( KIO::Job *job, const TQByteArray &data ) mNewStuffJobData[ job ].append( TQString::fromUtf8( str ) ); } -void Engine::slotNewStuffJobResult( KIO::Job *job ) +void Engine::slotNewStuffJobResult( TDEIO::Job *job ) { if ( job->error() ) { kdDebug(5850) << "Error downloading new stuff descriptions." << endl; @@ -192,12 +192,12 @@ void Engine::download( Entry *entry ) kdDebug(5850) << " SOURCE: " << source.url() << endl; kdDebug(5850) << " DESTINATION: " << destination.url() << endl; - KIO::FileCopyJob *job = KIO::file_copy( source, destination, -1, true ); - connect( job, TQT_SIGNAL( result( KIO::Job * ) ), - TQT_SLOT( slotDownloadJobResult( KIO::Job * ) ) ); + TDEIO::FileCopyJob *job = TDEIO::file_copy( source, destination, -1, true ); + connect( job, TQT_SIGNAL( result( TDEIO::Job * ) ), + TQT_SLOT( slotDownloadJobResult( TDEIO::Job * ) ) ); } -void Engine::slotDownloadJobResult( KIO::Job *job ) +void Engine::slotDownloadJobResult( TDEIO::Job *job ) { if ( job->error() ) { kdDebug(5850) << "Error downloading new stuff payload." << endl; @@ -313,9 +313,9 @@ void Engine::upload( Entry *entry ) KURL destination = mUploadProvider->uploadUrl(); destination.setFileName( fi.fileName() ); - KIO::FileCopyJob *job = KIO::file_copy( KURL::fromPathOrURL( mUploadFile ), destination ); - connect( job, TQT_SIGNAL( result( KIO::Job * ) ), - TQT_SLOT( slotUploadPayloadJobResult( KIO::Job * ) ) ); + TDEIO::FileCopyJob *job = TDEIO::file_copy( KURL::fromPathOrURL( mUploadFile ), destination ); + connect( job, TQT_SIGNAL( result( TDEIO::Job * ) ), + TQT_SLOT( slotUploadPayloadJobResult( TDEIO::Job * ) ) ); } else { emit uploadFinished( false ); } @@ -356,7 +356,7 @@ bool Engine::createMetaFile( Entry *entry ) return true; } -void Engine::slotUploadPayloadJobResult( KIO::Job *job ) +void Engine::slotUploadPayloadJobResult( TDEIO::Job *job ) { if ( job->error() ) { kdDebug(5850) << "Error uploading new stuff payload." << endl; @@ -375,12 +375,12 @@ void Engine::slotUploadPayloadJobResult( KIO::Job *job ) KURL previewDestination = mUploadProvider->uploadUrl(); previewDestination.setFileName( fi.fileName() ); - KIO::FileCopyJob *newJob = KIO::file_copy( KURL::fromPathOrURL( mPreviewFile ), previewDestination ); - connect( newJob, TQT_SIGNAL( result( KIO::Job * ) ), - TQT_SLOT( slotUploadPreviewJobResult( KIO::Job * ) ) ); + TDEIO::FileCopyJob *newJob = TDEIO::file_copy( KURL::fromPathOrURL( mPreviewFile ), previewDestination ); + connect( newJob, TQT_SIGNAL( result( TDEIO::Job * ) ), + TQT_SLOT( slotUploadPreviewJobResult( TDEIO::Job * ) ) ); } -void Engine::slotUploadPreviewJobResult( KIO::Job *job ) +void Engine::slotUploadPreviewJobResult( TDEIO::Job *job ) { if ( job->error() ) { kdDebug(5850) << "Error uploading new stuff preview." << endl; @@ -394,12 +394,12 @@ void Engine::slotUploadPreviewJobResult( KIO::Job *job ) KURL metaDestination = mUploadProvider->uploadUrl(); metaDestination.setFileName( fi.fileName() ); - KIO::FileCopyJob *newJob = KIO::file_copy( KURL::fromPathOrURL( mUploadMetaFile ), metaDestination ); - connect( newJob, TQT_SIGNAL( result( KIO::Job * ) ), - TQT_SLOT( slotUploadMetaJobResult( KIO::Job * ) ) ); + TDEIO::FileCopyJob *newJob = TDEIO::file_copy( KURL::fromPathOrURL( mUploadMetaFile ), metaDestination ); + connect( newJob, TQT_SIGNAL( result( TDEIO::Job * ) ), + TQT_SLOT( slotUploadMetaJobResult( TDEIO::Job * ) ) ); } -void Engine::slotUploadMetaJobResult( KIO::Job *job ) +void Engine::slotUploadMetaJobResult( TDEIO::Job *job ) { mUploadMetaFile = TQString(); if ( job->error() ) { diff --git a/lib/compatibility/knewstuff/engine.h b/lib/compatibility/knewstuff/engine.h index 5362351d..4341dd21 100644 --- a/lib/compatibility/knewstuff/engine.h +++ b/lib/compatibility/knewstuff/engine.h @@ -27,7 +27,7 @@ #include "entry.h" #include "provider.h" -namespace KIO { class Job; } +namespace TDEIO { class Job; } class KNewStuff; @@ -143,14 +143,14 @@ class Engine : public TQObject void getMetaInformation( Provider::List *providers ); void selectUploadProvider( Provider::List *providers ); - void slotNewStuffJobData( KIO::Job *job, const TQByteArray &data ); - void slotNewStuffJobResult( KIO::Job *job ); + void slotNewStuffJobData( TDEIO::Job *job, const TQByteArray &data ); + void slotNewStuffJobResult( TDEIO::Job *job ); - void slotDownloadJobResult( KIO::Job *job ); + void slotDownloadJobResult( TDEIO::Job *job ); - void slotUploadPayloadJobResult( KIO::Job *job ); - void slotUploadPreviewJobResult (KIO::Job *job ); - void slotUploadMetaJobResult( KIO::Job *job ); + void slotUploadPayloadJobResult( TDEIO::Job *job ); + void slotUploadPreviewJobResult (TDEIO::Job *job ); + void slotUploadMetaJobResult( TDEIO::Job *job ); protected: bool createMetaFile( Entry * ); @@ -160,8 +160,8 @@ class Engine : public TQObject ProviderLoader *mProviderLoader; - TQMap mNewStuffJobData; - TQMap mProviderJobs; + TQMap mNewStuffJobData; + TQMap mProviderJobs; TQPtrList mNewStuffList; diff --git a/lib/compatibility/knewstuff/knewstuffgeneric.h b/lib/compatibility/knewstuff/knewstuffgeneric.h index 6347bf53..053f83a0 100644 --- a/lib/compatibility/knewstuff/knewstuffgeneric.h +++ b/lib/compatibility/knewstuff/knewstuffgeneric.h @@ -23,7 +23,7 @@ #include "knewstuff.h" -class KConfig; +class TDEConfig; /** * @short Basic KNewStuff class with predefined actions. @@ -80,7 +80,7 @@ class KDE_EXPORT KNewStuffGeneric : public KNewStuff private: TQString destinationPath( KNS::Entry *entry ); - KConfig *mConfig; + TDEConfig *mConfig; }; #endif diff --git a/lib/compatibility/knewstuff/knewstuffsecure.cpp b/lib/compatibility/knewstuff/knewstuffsecure.cpp index 8e408e2d..3c90f068 100644 --- a/lib/compatibility/knewstuff/knewstuffsecure.cpp +++ b/lib/compatibility/knewstuff/knewstuffsecure.cpp @@ -144,7 +144,7 @@ void KNewStuffSecure::slotValidated(int result) emit installFinished(); } else { - KConfig *cfg = TDEGlobal::config(); + TDEConfig *cfg = TDEGlobal::config(); cfg->deleteGroup("KNewStuffStatus"); cfg->setGroup("KNewStuffStatus"); for (TQMap::ConstIterator it = m_installedResources.constBegin(); it != m_installedResources.constEnd(); ++it) @@ -159,7 +159,7 @@ void KNewStuffSecure::slotValidated(int result) void KNewStuffSecure::downloadResource() { - KConfig *cfg = TDEGlobal::config(); + TDEConfig *cfg = TDEGlobal::config(); m_installedResources = cfg->entryMap("KNewStuffStatus"); engine()->ignoreInstallResult(true); KNewStuff::download(); @@ -179,7 +179,7 @@ void KNewStuffSecure::uploadResource(const TQString& fileName) m_tempDir->setAutoDelete(true); TQFileInfo f(fileName); m_signedFileName = m_tempDir->name() + "/" + f.fileName(); - KIO::NetAccess::file_copy(KURL::fromPathOrURL(fileName), KURL::fromPathOrURL(m_signedFileName), -1, true); + TDEIO::NetAccess::file_copy(KURL::fromPathOrURL(fileName), KURL::fromPathOrURL(m_signedFileName), -1, true); Security::ref()->signFile(m_signedFileName); } @@ -215,7 +215,7 @@ void KNewStuffSecure::slotFileSigned(int result) file.close(); } tar.close(); - KIO::NetAccess::file_move(KURL::fromPathOrURL(m_signedFileName + ".signed"), KURL::fromPathOrURL(m_signedFileName), -1, true); + TDEIO::NetAccess::file_move(KURL::fromPathOrURL(m_signedFileName + ".signed"), KURL::fromPathOrURL(m_signedFileName), -1, true); KNewStuff::upload(m_signedFileName, TQString()); disconnect(Security::ref(), TQT_SIGNAL(fileSigned(int)), this, TQT_SLOT(slotFileSigned(int))); } @@ -231,7 +231,7 @@ void KNewStuffSecure::removeTempDirectory() { if (m_tempDir) { - KIO::NetAccess::del(KURL().fromPathOrURL(m_tempDir->name()), parentWidget()); + TDEIO::NetAccess::del(KURL().fromPathOrURL(m_tempDir->name()), parentWidget()); delete m_tempDir; m_tempDir = 0L; } diff --git a/lib/compatibility/knewstuff/provider.cpp b/lib/compatibility/knewstuff/provider.cpp index 67a44ebd..92be65b6 100644 --- a/lib/compatibility/knewstuff/provider.cpp +++ b/lib/compatibility/knewstuff/provider.cpp @@ -154,7 +154,7 @@ void ProviderLoader::load( const TQString &type, const TQString &providersList ) mProviders.clear(); mJobData = ""; - KConfig *cfg = TDEGlobal::config(); + TDEConfig *cfg = TDEGlobal::config(); cfg->setGroup("KNewStuff"); TQString providersUrl = providersList; @@ -171,16 +171,16 @@ void ProviderLoader::load( const TQString &type, const TQString &providersList ) kdDebug(5850) << "ProviderLoader::load(): providersUrl: " << providersUrl << endl; - KIO::TransferJob *job = KIO::get( KURL( providersUrl ) ); - connect( job, TQT_SIGNAL( result( KIO::Job * ) ), - TQT_SLOT( slotJobResult( KIO::Job * ) ) ); - connect( job, TQT_SIGNAL( data( KIO::Job *, const TQByteArray & ) ), - TQT_SLOT( slotJobData( KIO::Job *, const TQByteArray & ) ) ); + TDEIO::TransferJob *job = TDEIO::get( KURL( providersUrl ) ); + connect( job, TQT_SIGNAL( result( TDEIO::Job * ) ), + TQT_SLOT( slotJobResult( TDEIO::Job * ) ) ); + connect( job, TQT_SIGNAL( data( TDEIO::Job *, const TQByteArray & ) ), + TQT_SLOT( slotJobData( TDEIO::Job *, const TQByteArray & ) ) ); // job->dumpObjectInfo(); } -void ProviderLoader::slotJobData( KIO::Job *, const TQByteArray &data ) +void ProviderLoader::slotJobData( TDEIO::Job *, const TQByteArray &data ) { kdDebug(5850) << "ProviderLoader::slotJobData()" << endl; @@ -191,7 +191,7 @@ void ProviderLoader::slotJobData( KIO::Job *, const TQByteArray &data ) mJobData.append( TQString::fromUtf8( str ) ); } -void ProviderLoader::slotJobResult( KIO::Job *job ) +void ProviderLoader::slotJobResult( TDEIO::Job *job ) { if ( job->error() ) { job->showErrorDialog( mParentWidget ); diff --git a/lib/compatibility/knewstuff/provider.h b/lib/compatibility/knewstuff/provider.h index 268bd92b..630568e4 100644 --- a/lib/compatibility/knewstuff/provider.h +++ b/lib/compatibility/knewstuff/provider.h @@ -28,7 +28,7 @@ #include -namespace KIO { class Job; } +namespace TDEIO { class Job; } namespace KNS { @@ -191,8 +191,8 @@ class ProviderLoader : public TQObject void providersLoaded( Provider::List * ); protected slots: - void slotJobData( KIO::Job *, const TQByteArray & ); - void slotJobResult( KIO::Job * ); + void slotJobData( TDEIO::Job *, const TQByteArray & ); + void slotJobResult( TDEIO::Job * ); private: TQWidget *mParentWidget; diff --git a/lib/compatibility/knewstuff/uploaddialog.cpp b/lib/compatibility/knewstuff/uploaddialog.cpp index 12261d71..9e6ae83a 100644 --- a/lib/compatibility/knewstuff/uploaddialog.cpp +++ b/lib/compatibility/knewstuff/uploaddialog.cpp @@ -100,7 +100,7 @@ UploadDialog::UploadDialog( Engine *engine, TQWidget *parent ) : mSummaryEdit = new KTextEdit( topPage ); topLayout->addMultiCellWidget( mSummaryEdit, 8, 8, 0, 1 ); - KConfig *conf = kapp->config(); + TDEConfig *conf = kapp->config(); conf->setGroup("KNewStuffUpload"); TQString name = conf->readEntry("name"); TQString author = conf->readEntry("author"); @@ -152,7 +152,7 @@ void UploadDialog::slotOk() entry->setPreview( KURL( mPreviewUrl->url().section("/", -1) ), mLanguageCombo->currentText() ); entry->setSummary( mSummaryEdit->text(), mLanguageCombo->currentText() ); - KConfig *conf = kapp->config(); + TDEConfig *conf = kapp->config(); conf->setGroup("KNewStuffUpload"); conf->writeEntry("name", mNameEdit->text()); conf->writeEntry("author", mAuthorEdit->text()); -- cgit v1.2.1