summaryrefslogtreecommitdiffstats
path: root/src/newstuff
diff options
context:
space:
mode:
Diffstat (limited to 'src/newstuff')
-rw-r--r--src/newstuff/dialog.cpp38
-rw-r--r--src/newstuff/dialog.h14
-rw-r--r--src/newstuff/manager.cpp34
-rw-r--r--src/newstuff/manager.h6
-rw-r--r--src/newstuff/providerloader.cpp18
-rw-r--r--src/newstuff/providerloader.h8
6 files changed, 59 insertions, 59 deletions
diff --git a/src/newstuff/dialog.cpp b/src/newstuff/dialog.cpp
index 31e41db..0d21c69 100644
--- a/src/newstuff/dialog.cpp
+++ b/src/newstuff/dialog.cpp
@@ -215,7 +215,7 @@ Dialog::Dialog(NewStuff::DataType type_, TQWidget* parent_)
setMinimumHeight(TQMAX(minimumHeight(), NEW_STUFF_MIN_HEIGHT));
resize(configDialogSize(TQString::fromLatin1("NewStuff Dialog Options")));
- KConfigGroup dialogConfig(TDEGlobal::config(), "NewStuff Dialog Options");
+ TDEConfigGroup dialogConfig(TDEGlobal::config(), "NewStuff Dialog Options");
TQValueList<int> splitList = dialogConfig.readIntListEntry("Splitter Sizes");
if(!splitList.empty()) {
m_split->setSizes(splitList);
@@ -225,10 +225,10 @@ Dialog::Dialog(NewStuff::DataType type_, TQWidget* parent_)
ProviderLoader* loader = new Tellico::NewStuff::ProviderLoader(this);
connect(loader, TQT_SIGNAL(providersLoaded(TQPtrList<KNS::Provider>*)), TQT_SLOT(slotProviders(TQPtrList<KNS::Provider>*)));
- connect(loader, TQT_SIGNAL(percent(KIO::Job*, unsigned long)), TQT_SLOT(slotShowPercent(KIO::Job*, unsigned long)));
+ connect(loader, TQT_SIGNAL(percent(TDEIO::Job*, unsigned long)), TQT_SLOT(slotShowPercent(TDEIO::Job*, unsigned long)));
connect(loader, TQT_SIGNAL(error()), TQT_SLOT(slotProviderError()));
- KConfigGroup config(TDEGlobal::config(), "KNewStuff");
+ TDEConfigGroup config(TDEGlobal::config(), "KNewStuff");
TQString prov = config.readEntry("ProvidersUrl");
if(prov.isEmpty()) {
if(m_type == EntryTemplate) {
@@ -254,7 +254,7 @@ Dialog::~Dialog() {
m_cursorSaver = 0;
saveDialogSize(TQString::fromLatin1("NewStuff Dialog Options"));
- KConfigGroup config(TDEGlobal::config(), "NewStuff Dialog Options");
+ TDEConfigGroup config(TDEGlobal::config(), "NewStuff Dialog Options");
config.writeEntry("Splitter Sizes", m_split->sizes());
}
@@ -270,22 +270,22 @@ void Dialog::slotProviderError() {
void Dialog::slotProviders(TQPtrList<KNS::Provider>* list_) {
for(KNS::Provider* prov = list_->first(); prov; prov = list_->next()) {
- KIO::TransferJob* job = KIO::get(prov->downloadUrl());
+ TDEIO::TransferJob* job = TDEIO::get(prov->downloadUrl());
m_jobs[job] = prov;
- connect(job, TQT_SIGNAL(data(KIO::Job*, const TQByteArray&)),
- TQT_SLOT(slotData(KIO::Job*, const TQByteArray&)));
- connect(job, TQT_SIGNAL(result(KIO::Job*)), TQT_SLOT(slotResult(KIO::Job*)));
- connect(job, TQT_SIGNAL(percent(KIO::Job*, unsigned long)),
- TQT_SLOT(slotShowPercent(KIO::Job*, unsigned long)));
+ connect(job, TQT_SIGNAL(data(TDEIO::Job*, const TQByteArray&)),
+ TQT_SLOT(slotData(TDEIO::Job*, const TQByteArray&)));
+ connect(job, TQT_SIGNAL(result(TDEIO::Job*)), TQT_SLOT(slotResult(TDEIO::Job*)));
+ connect(job, TQT_SIGNAL(percent(TDEIO::Job*, unsigned long)),
+ TQT_SLOT(slotShowPercent(TDEIO::Job*, unsigned long)));
}
}
-void Dialog::slotData(KIO::Job* job_, const TQByteArray& data_) {
+void Dialog::slotData(TDEIO::Job* job_, const TQByteArray& data_) {
TQDataStream stream(m_data[job_], IO_WriteOnly | IO_Append);
stream.writeRawBytes(data_.data(), data_.size());
}
-void Dialog::slotResult(KIO::Job* job_) {
+void Dialog::slotResult(TDEIO::Job* job_) {
// myDebug() << "NewStuff::Dialog::slotResult()" << endl;
TQDomDocument dom;
if(!dom.setContent(m_data[job_])) {
@@ -364,10 +364,10 @@ void Dialog::slotSelected(TQListViewItem* item_) {
m_tempPreviewImage->setAutoDelete(true);
KURL dest;
dest.setPath(m_tempPreviewImage->name());
- KIO::FileCopyJob* job = KIO::file_copy(preview, dest, -1, true, false, false);
- connect(job, TQT_SIGNAL(result(KIO::Job*)), TQT_SLOT(slotPreviewResult(KIO::Job*)));
- connect(job, TQT_SIGNAL(percent(KIO::Job*, unsigned long)),
- TQT_SLOT(slotShowPercent(KIO::Job*, unsigned long)));
+ TDEIO::FileCopyJob* job = TDEIO::file_copy(preview, dest, -1, true, false, false);
+ connect(job, TQT_SIGNAL(result(TDEIO::Job*)), TQT_SLOT(slotPreviewResult(TDEIO::Job*)));
+ connect(job, TQT_SIGNAL(percent(TDEIO::Job*, unsigned long)),
+ TQT_SLOT(slotShowPercent(TDEIO::Job*, unsigned long)));
m_lastPreviewItem = item_;
}
TQPixmap pix = m_type == EntryTemplate
@@ -444,7 +444,7 @@ void Dialog::setStatus(const TQString& text_) {
m_statusBar->changeItem(TQChar(' ') + text_, PROGRESS_STATUS_ID);
}
-void Dialog::slotShowPercent(KIO::Job*, unsigned long pct_) {
+void Dialog::slotShowPercent(TDEIO::Job*, unsigned long pct_) {
if(pct_ >= 100) {
m_progress->hide();
} else {
@@ -453,8 +453,8 @@ void Dialog::slotShowPercent(KIO::Job*, unsigned long pct_) {
}
}
-void Dialog::slotPreviewResult(KIO::Job* job_) {
- KIO::FileCopyJob* job = static_cast<KIO::FileCopyJob*>(job_);
+void Dialog::slotPreviewResult(TDEIO::Job* job_) {
+ TDEIO::FileCopyJob* job = static_cast<TDEIO::FileCopyJob*>(job_);
if(job->error()) {
return;
}
diff --git a/src/newstuff/dialog.h b/src/newstuff/dialog.h
index 65046ca..082fbd8 100644
--- a/src/newstuff/dialog.h
+++ b/src/newstuff/dialog.h
@@ -20,7 +20,7 @@
class KPushButton;
class KStatusBar;
-namespace KIO {
+namespace TDEIO {
class Job;
}
namespace KNS {
@@ -53,11 +53,11 @@ public:
private slots:
void slotProviders(TQPtrList<KNS::Provider>* list);
- void slotData(KIO::Job* job, const TQByteArray& data);
- void slotResult(KIO::Job* job);
- void slotPreviewResult(KIO::Job* job);
+ void slotData(TDEIO::Job* job, const TQByteArray& data);
+ void slotResult(TDEIO::Job* job);
+ void slotPreviewResult(TDEIO::Job* job);
- void slotShowPercent(KIO::Job* job, unsigned long percent);
+ void slotShowPercent(TDEIO::Job* job, unsigned long percent);
void slotSelected(TQListViewItem* item);
void slotInstall();
@@ -90,8 +90,8 @@ private:
GUI::CursorSaver* m_cursorSaver;
KTempFile* m_tempPreviewImage;
- TQMap<KIO::Job*, KNS::Provider*> m_jobs;
- TQMap<KIO::Job*, TQByteArray> m_data;
+ TQMap<TDEIO::Job*, KNS::Provider*> m_jobs;
+ TQMap<TDEIO::Job*, TQByteArray> m_data;
TQMap<TQListViewItem*, KNS::Entry*> m_entryMap;
TQListViewItem* m_lastPreviewItem;
diff --git a/src/newstuff/manager.cpp b/src/newstuff/manager.cpp
index 8eabc7d..45eae08 100644
--- a/src/newstuff/manager.cpp
+++ b/src/newstuff/manager.cpp
@@ -83,7 +83,7 @@ bool Manager::installTemplate(const KURL& url_, const TQString& entryName_) {
if(TQFile::exists(dest.path())) {
myDebug() << "Manager::installTemplate() - " << dest.path() << " exists!" << endl;
success = false;
- } else if(KIO::NetAccess::file_copy(url_, dest)) {
+ } else if(TDEIO::NetAccess::file_copy(url_, dest)) {
xslFile = dest.fileName();
allFiles += xslFile;
}
@@ -94,7 +94,7 @@ bool Manager::installTemplate(const KURL& url_, const TQString& entryName_) {
} else {
// remove ".xsl"
xslFile.truncate(xslFile.length()-4);
- KConfigGroup config(TDEGlobal::config(), "KNewStuffFiles");
+ TDEConfigGroup config(TDEGlobal::config(), "KNewStuffFiles");
config.writeEntry(xslFile, allFiles);
m_urlNameMap.insert(url_, xslFile);
}
@@ -106,7 +106,7 @@ bool Manager::installTemplate(const KURL& url_, const TQString& entryName_) {
}
bool Manager::removeTemplate(const TQString& name_) {
- KConfigGroup fileGroup(TDEGlobal::config(), "KNewStuffFiles");
+ TDEConfigGroup fileGroup(TDEGlobal::config(), "KNewStuffFiles");
TQStringList files = fileGroup.readListEntry(name_);
// at least, delete xsl file
if(files.isEmpty()) {
@@ -130,7 +130,7 @@ bool Manager::removeTemplate(const TQString& name_) {
// remove config entries even if unsuccessful
fileGroup.deleteEntry(name_);
- KConfigGroup statusGroup(TDEGlobal::config(), "KNewStuffStatus");
+ TDEConfigGroup statusGroup(TDEGlobal::config(), "KNewStuffStatus");
TQString entryName = statusGroup.readEntry(name_);
statusGroup.deleteEntry(name_);
statusGroup.deleteEntry(entryName);
@@ -170,7 +170,7 @@ bool Manager::installScript(const KURL& url_) {
KURL u;
u.setPath(scriptFolder);
myLog() << "Manager::installScript() - deleting " << scriptFolder << endl;
- KIO::NetAccess::del(u, Kernel::self()->widget());
+ TDEIO::NetAccess::del(u, Kernel::self()->widget());
info->isUpdate = true;
}
scriptFolder = copyTarget;
@@ -200,7 +200,7 @@ bool Manager::installScript(const KURL& url_) {
::chmod(TQFile::encodeName(dest.path()), item.permissions() | S_IXUSR);
{
- KConfig spec(info->specFile, false, false);
+ TDEConfig spec(info->specFile, false, false);
// update name
info->sourceName = spec.readEntry("Name", info->sourceName);
spec.writePathEntry("ExecPath", info->sourceExec);
@@ -209,7 +209,7 @@ bool Manager::installScript(const KURL& url_) {
}
{
- KConfigGroup config(TDEGlobal::config(), "KNewStuffFiles");
+ TDEConfigGroup config(TDEGlobal::config(), "KNewStuffFiles");
config.writeEntry(info->sourceName, archiveFiles(archiveDir));
m_urlNameMap.insert(url_, info->sourceName);
}
@@ -225,7 +225,7 @@ bool Manager::installScript(const KURL& url_) {
}
bool Manager::removeScript(const TQString& name_) {
- KConfigGroup fileGroup(TDEGlobal::config(), "KNewStuffFiles");
+ TDEConfigGroup fileGroup(TDEGlobal::config(), "KNewStuffFiles");
TQStringList files = fileGroup.readListEntry(name_);
bool success = true;
@@ -244,7 +244,7 @@ bool Manager::removeScript(const TQString& name_) {
// remove config entries even if unsuccessful
fileGroup.deleteEntry(name_);
- KConfigGroup statusGroup(TDEGlobal::config(), "KNewStuffStatus");
+ TDEConfigGroup statusGroup(TDEGlobal::config(), "KNewStuffStatus");
TQString entryName = statusGroup.readEntry(name_);
statusGroup.deleteEntry(name_);
statusGroup.deleteEntry(entryName);
@@ -253,7 +253,7 @@ bool Manager::removeScript(const TQString& name_) {
}
Tellico::NewStuff::InstallStatus Manager::installStatus(KNS::Entry* entry_) {
- KConfigGroup config(TDEGlobal::config(), "KNewStuffStatus");
+ TDEConfigGroup config(TDEGlobal::config(), "KNewStuffStatus");
TQString datestring = config.readEntry(entry_->name());
if(datestring.isEmpty()) {
return NotInstalled;
@@ -268,7 +268,7 @@ Tellico::NewStuff::InstallStatus Manager::installStatus(KNS::Entry* entry_) {
}
// also check that executable files exists
- KConfigGroup fileGroup(TDEGlobal::config(), "KNewStuffFiles");
+ TDEConfigGroup fileGroup(TDEGlobal::config(), "KNewStuffFiles");
TQStringList files = fileGroup.readListEntry(entry_->name());
TQString path = Tellico::saveLocation(TQString::fromLatin1("data-sources/"));
for(TQStringList::ConstIterator it = files.begin(); it != files.end(); ++it) {
@@ -346,13 +346,13 @@ void Manager::install(DataType type_, KNS::Entry* entry_) {
KURL destination;
destination.setPath(m_tempFile->name());
- KIO::FileCopyJob* job = KIO::file_copy(entry_->payload(), destination, -1, true);
- connect(job, TQT_SIGNAL(result(KIO::Job*)), TQT_SLOT(slotDownloadJobResult(KIO::Job*)));
+ TDEIO::FileCopyJob* job = TDEIO::file_copy(entry_->payload(), destination, -1, true);
+ connect(job, TQT_SIGNAL(result(TDEIO::Job*)), TQT_SLOT(slotDownloadJobResult(TDEIO::Job*)));
m_jobMap.insert(job, EntryPair(entry_, type_));
}
-void Manager::slotDownloadJobResult(KIO::Job* job_) {
- KIO::FileCopyJob* job = static_cast<KIO::FileCopyJob*>(job_);
+void Manager::slotDownloadJobResult(TDEIO::Job* job_) {
+ TDEIO::FileCopyJob* job = static_cast<TDEIO::FileCopyJob*>(job_);
if(job->error()) {
GUI::CursorSaver cs(TQt::arrowCursor);
delete m_tempFile;
@@ -394,7 +394,7 @@ void Manager::slotInstallFinished() {
if(newScript && newScript->successfulInstall()) {
const TQString name = m_urlNameMap[newScript->url()];
KNS::Entry* entry = m_scriptEntryMap[newScript];
- KConfigGroup config(TDEGlobal::config(), "KNewStuffStatus");
+ TDEConfigGroup config(TDEGlobal::config(), "KNewStuffStatus");
// have to keep a config entry that maps the name of the file to the name
// of the newstuff entry, so we can track which entries are installed
// name and entry-name() are probably the same for scripts, but not a problem
@@ -440,7 +440,7 @@ bool Manager::checkCommonFile() {
KURL src, dest;
src.setPath(TDEGlobal::dirs()->findResource("appdata", TQString::fromLatin1("tellico-common.xsl")));
dest.setPath(userCommonFile);
- return KIO::NetAccess::file_copy(src, dest);
+ return TDEIO::NetAccess::file_copy(src, dest);
}
#include "manager.moc"
diff --git a/src/newstuff/manager.h b/src/newstuff/manager.h
index 73b77a5..f979ac1 100644
--- a/src/newstuff/manager.h
+++ b/src/newstuff/manager.h
@@ -26,7 +26,7 @@ class TQStringList;
namespace KNS {
class Entry;
}
-namespace KIO {
+namespace TDEIO {
class Job;
}
@@ -78,7 +78,7 @@ signals:
void signalInstalled(KNS::Entry* entry);
private slots:
- void slotDownloadJobResult(KIO::Job* job);
+ void slotDownloadJobResult(TDEIO::Job* job);
void slotInstallFinished();
private:
@@ -89,7 +89,7 @@ private:
static TQString findEXE(const KArchiveDirectory* dir);
typedef TQPair<KNS::Entry*, DataType> EntryPair;
- TQMap<KIO::Job*, EntryPair> m_jobMap;
+ TQMap<TDEIO::Job*, EntryPair> m_jobMap;
TQMap<KURL, TQString> m_urlNameMap;
TQMap<const NewScript*, KNS::Entry*> m_scriptEntryMap;
TQPtrList<DataSourceInfo> m_infoList;
diff --git a/src/newstuff/providerloader.cpp b/src/newstuff/providerloader.cpp
index 20eda49..0f12a7e 100644
--- a/src/newstuff/providerloader.cpp
+++ b/src/newstuff/providerloader.cpp
@@ -43,25 +43,25 @@ void ProviderLoader::load( const TQString &type, const TQString &providersList )
// myLog() << "ProviderLoader::load(): providersList: " << providersList << endl;
- KIO::TransferJob *job = KIO::get( KURL( providersList ), false, false );
- 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 & ) ) );
- connect( job, TQT_SIGNAL( percent (KIO::Job *, unsigned long) ),
- TQT_SIGNAL( percent (KIO::Job *, unsigned long) ) );
+ TDEIO::TransferJob *job = TDEIO::get( KURL( providersList ), false, false );
+ 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 & ) ) );
+ connect( job, TQT_SIGNAL( percent (TDEIO::Job *, unsigned long) ),
+ TQT_SIGNAL( percent (TDEIO::Job *, unsigned long) ) );
// job->dumpObjectInfo();
}
-void ProviderLoader::slotJobData( KIO::Job *, const TQByteArray &data )
+void ProviderLoader::slotJobData( TDEIO::Job *, const TQByteArray &data )
{
if ( data.size() == 0 ) return;
TQCString str( data, data.size() + 1 );
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/src/newstuff/providerloader.h b/src/newstuff/providerloader.h
index a3dfed1..8b24dbc 100644
--- a/src/newstuff/providerloader.h
+++ b/src/newstuff/providerloader.h
@@ -24,7 +24,7 @@
#include <tqobject.h>
#include <tqptrlist.h>
-namespace KIO {
+namespace TDEIO {
class Job;
}
namespace KNS {
@@ -63,12 +63,12 @@ public:
* Indicates that the list of providers has been successfully loaded.
*/
void providersLoaded( TQPtrList<KNS::Provider>* );
- void percent(KIO::Job *job, unsigned long percent);
+ void percent(TDEIO::Job *job, unsigned long percent);
void error();
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;