summaryrefslogtreecommitdiffstats
path: root/kget
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-01-25 00:36:20 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-01-25 00:36:20 -0600
commitf21aaec952493cb5688c73de6e82a569ddbd7fb2 (patch)
tree78ccb5117063da3e08e3277e11054b912a9f2ae7 /kget
parentc48e769eb275917717e2b55eb869f7e559293ac8 (diff)
downloadtdenetwork-f21aaec952493cb5688c73de6e82a569ddbd7fb2.tar.gz
tdenetwork-f21aaec952493cb5688c73de6e82a569ddbd7fb2.zip
Rename KCModule, KConfig, KIO, KServer, and KSocket to avoid conflicts with KDE4
Diffstat (limited to 'kget')
-rw-r--r--kget/dlgAdvanced.cpp2
-rw-r--r--kget/dlgIndividual.cpp8
-rw-r--r--kget/dlgIndividual.h6
-rw-r--r--kget/getfilejob.cpp2
-rw-r--r--kget/getfilejob.h2
-rw-r--r--kget/http_defaults.h2
-rw-r--r--kget/kmainwidget.cpp54
-rw-r--r--kget/safedelete.cpp2
-rw-r--r--kget/settings.cpp6
-rw-r--r--kget/slave.cpp42
-rw-r--r--kget/slave.h18
-rw-r--r--kget/transfer.cpp22
-rw-r--r--kget/transfer.h12
-rw-r--r--kget/transferlist.cpp4
14 files changed, 91 insertions, 91 deletions
diff --git a/kget/dlgAdvanced.cpp b/kget/dlgAdvanced.cpp
index e4dee980..9a1f7efe 100644
--- a/kget/dlgAdvanced.cpp
+++ b/kget/dlgAdvanced.cpp
@@ -82,7 +82,7 @@ void DlgAdvanced::applyData()
if (ksettings.b_KonquerorIntegration!=bIsKonquiEnable)
{
ksettings.b_KonquerorIntegration=!ksettings.b_KonquerorIntegration;
- KConfig cfg("konquerorrc", false, false);
+ TDEConfig cfg("konquerorrc", false, false);
cfg.setGroup("HTML Settings");
cfg.writePathEntry("DownloadManager",TQString((bIsKonquiEnable)?"kget":""));
cfg.sync();
diff --git a/kget/dlgIndividual.cpp b/kget/dlgIndividual.cpp
index 030d3f2f..a22bccea 100644
--- a/kget/dlgIndividual.cpp
+++ b/kget/dlgIndividual.cpp
@@ -208,7 +208,7 @@ DlgIndividual::DlgIndividual(Transfer * _item)
}
-void DlgIndividual::setTotalSize(KIO::filesize_t bytes)
+void DlgIndividual::setTotalSize(TDEIO::filesize_t bytes)
{
m_iTotalSize = bytes;
}
@@ -218,13 +218,13 @@ void DlgIndividual::setPercent(unsigned long percent)
{
m_pProgressBar->setValue(percent);
m_pDockIndividual->setValue(percent);
- setCaption(i18n("%1% of %2 - %3").arg(percent).arg(KIO::convertSize(m_iTotalSize)).arg(m_location.fileName()));
+ setCaption(i18n("%1% of %2 - %3").arg(percent).arg(TDEIO::convertSize(m_iTotalSize)).arg(m_location.fileName()));
}
-void DlgIndividual::setProcessedSize(KIO::filesize_t bytes)
+void DlgIndividual::setProcessedSize(TDEIO::filesize_t bytes)
{
- sizeLabel->setText(i18n("%1 of %2").arg(KIO::convertSize(bytes)).arg(KIO::convertSize(m_iTotalSize)));
+ sizeLabel->setText(i18n("%1 of %2").arg(TDEIO::convertSize(bytes)).arg(TDEIO::convertSize(m_iTotalSize)));
}
diff --git a/kget/dlgIndividual.h b/kget/dlgIndividual.h
index 6c176662..91d7f8e3 100644
--- a/kget/dlgIndividual.h
+++ b/kget/dlgIndividual.h
@@ -60,9 +60,9 @@ public:
void enableOpenFile();
public slots:
- void setTotalSize(KIO::filesize_t bytes);
+ void setTotalSize(TDEIO::filesize_t bytes);
- void setProcessedSize(KIO::filesize_t bytes);
+ void setProcessedSize(TDEIO::filesize_t bytes);
void setSpeed(TQString speed);
void setPercent(unsigned long percent);
@@ -106,7 +106,7 @@ protected:
bool bKeepDlgOpen;
- KIO::filesize_t m_iTotalSize;
+ TDEIO::filesize_t m_iTotalSize;
bool advanced;
}
diff --git a/kget/getfilejob.cpp b/kget/getfilejob.cpp
index 3710dda1..eed7f28c 100644
--- a/kget/getfilejob.cpp
+++ b/kget/getfilejob.cpp
@@ -17,7 +17,7 @@
#include "getfilejob.h"
-namespace KIO
+namespace TDEIO
{
diff --git a/kget/getfilejob.h b/kget/getfilejob.h
index 04c44258..fbfd2dca 100644
--- a/kget/getfilejob.h
+++ b/kget/getfilejob.h
@@ -21,7 +21,7 @@
#include <kio/jobclasses.h>
-namespace KIO
+namespace TDEIO
{
class GetFileJob:public FileCopyJob
diff --git a/kget/http_defaults.h b/kget/http_defaults.h
index 9369dfec..77c63825 100644
--- a/kget/http_defaults.h
+++ b/kget/http_defaults.h
@@ -36,7 +36,7 @@
#define DEFAULT_MAX_CACHE_AGE 60*60*24*14 // 14 DAYS
#define DEFAULT_CACHE_EXPIRE 10 // 10 SECS
#define DEFAULT_CLEAN_CACHE_INTERVAL 30*60 // 30 MINS
-#define DEFAULT_CACHE_CONTROL KIO::CC_Verify // Verify with remote
+#define DEFAULT_CACHE_CONTROL TDEIO::CC_Verify // Verify with remote
#define CACHE_REVISION "7\n" // Cache version
// DEFAULT USER AGENT KEY - ENABLES OS NAME
diff --git a/kget/kmainwidget.cpp b/kget/kmainwidget.cpp
index b80625c6..69a4a85e 100644
--- a/kget/kmainwidget.cpp
+++ b/kget/kmainwidget.cpp
@@ -128,7 +128,7 @@ KMainWidget::KMainWidget(bool bStartDocked)
#endif
{
- KConfig cfg( "kioslaverc", false, false);
+ TDEConfig cfg( "kioslaverc", false, false);
cfg.setGroup(TQString());
cfg.writeEntry("AutoResume", true);
cfg.sync();
@@ -152,7 +152,7 @@ KMainWidget::KMainWidget(bool bStartDocked)
logFileName += tmp;
lastClipboard = TQApplication::clipboard()->text( TQClipboard::Clipboard ).stripWhiteSpace();
- // Load all settings from KConfig
+ // Load all settings from TDEConfig
ksettings.load();
// Setup log window
@@ -414,7 +414,7 @@ void KMainWidget::setupGUI()
statusBar()->insertFixedItem(i18n(" Transfers: %1 ").arg(99), ID_TOTAL_TRANSFERS);
statusBar()->insertFixedItem(i18n(" Files: %1 ").arg(555), ID_TOTAL_FILES);
statusBar()->insertFixedItem(i18n(" Size: %1 KB ").arg("134.56"), ID_TOTAL_SIZE);
- statusBar()->insertFixedItem(i18n(" Time: %1 ").arg(KIO::convertSeconds(0)), ID_TOTAL_TIME);
+ statusBar()->insertFixedItem(i18n(" Time: %1 ").arg(TDEIO::convertSeconds(0)), ID_TOTAL_TIME);
statusBar()->insertFixedItem(i18n(" %1 KB/s ").arg("123.34"), ID_TOTAL_SPEED);
setAutoSaveSettings( "MainWindow", false /*Settings takes care of size & pos & state */ );
@@ -548,9 +548,9 @@ void KMainWidget::slotImportTextFile()
if (!filename.isValid())
return;
- if (KIO::NetAccess::download(filename, tmpFile, this)) {
+ if (TDEIO::NetAccess::download(filename, tmpFile, this)) {
list = kFileToString(tmpFile);
- KIO::NetAccess::removeTempFile(tmpFile);
+ TDEIO::NetAccess::removeTempFile(tmpFile);
} else
list = kFileToString(filename.path()); // file not accessible -> give error message
@@ -1112,7 +1112,7 @@ void KMainWidget::addTransferEx(const KURL& url, const KURL& destFile)
}
//check if destination already exists
- if(KIO::NetAccess::exists(destURL, false, this))
+ if(TDEIO::NetAccess::exists(destURL, false, this))
{
if (KMessageBox::warningYesNo(this,i18n("Destination file \n%1\nalready exists.\nDo you want to overwrite it?").arg( destURL.prettyURL()), TQString(), i18n("Overwrite"), i18n("Do Not Overwrite") )
== KMessageBox::Yes)
@@ -1135,7 +1135,7 @@ void KMainWidget::addTransferEx(const KURL& url, const KURL& destFile)
{
// simply delete it, the calling process should have asked if you
// really want to delete (at least khtml does)
- if(KIO::NetAccess::exists(destURL, false, this))
+ if(TDEIO::NetAccess::exists(destURL, false, this))
SafeDelete::deleteFile( destURL );
}
@@ -1190,7 +1190,7 @@ void KMainWidget::addTransfers( const KURL::List& src, const TQString& destDir )
{
destURL.adjustPath( +1 );
destURL.setFileName( fileName );
- if(KIO::NetAccess::exists(destURL, false, this))
+ if(TDEIO::NetAccess::exists(destURL, false, this))
{
if (KMessageBox::warningYesNo(this,i18n("Destination file \n%1\nalready exists.\nDo you want to overwrite it?").arg( destURL.prettyURL()), TQString(), i18n("Overwrite"), i18n("Do Not Overwrite") )
== KMessageBox::Yes)
@@ -1249,7 +1249,7 @@ void KMainWidget::addTransfers( const KURL::List& src, const TQString& destDir )
bool skip_all = false;
bool overwrite_all = false;
it = urls.begin();
- KIO::RenameDlg_Result result;
+ TDEIO::RenameDlg_Result result;
while ( it != urls.end() )
{
@@ -1266,32 +1266,32 @@ void KMainWidget::addTransfers( const KURL::List& src, const TQString& destDir )
(*it).dest.setFileName( fileName );
- if( KIO::NetAccess::exists((*it).dest, false, this))
+ if( TDEIO::NetAccess::exists((*it).dest, false, this))
{
TQString newdest;
if (skip_all)
- result = KIO::R_SKIP;
+ result = TDEIO::R_SKIP;
else if( overwrite_all )
- result = KIO::R_OVERWRITE;
+ result = TDEIO::R_OVERWRITE;
else
{
TQFileInfo finfo( (*it).dest.path() );
TQString caption = i18n( "File Already exists" ) + " - KGet";
- result = KIO::open_RenameDlg( caption, (*it).src.url(), (*it).dest.url(), KIO::RenameDlg_Mode(KIO::M_OVERWRITE|KIO::M_SKIP|KIO::M_MULTI), newdest, (KIO::filesize_t) -1, (KIO::filesize_t)finfo.size(), (time_t) -1, (time_t) -1, (time_t) -1, finfo.lastModified().toTime_t());
+ result = TDEIO::open_RenameDlg( caption, (*it).src.url(), (*it).dest.url(), TDEIO::RenameDlg_Mode(TDEIO::M_OVERWRITE|TDEIO::M_SKIP|TDEIO::M_MULTI), newdest, (TDEIO::filesize_t) -1, (TDEIO::filesize_t)finfo.size(), (time_t) -1, (time_t) -1, (time_t) -1, finfo.lastModified().toTime_t());
}
switch (result)
{
- case KIO::R_RENAME:
+ case TDEIO::R_RENAME:
(*it).dest = KURL::fromPathOrURL( newdest );
break;
- case KIO::R_OVERWRITE_ALL:
+ case TDEIO::R_OVERWRITE_ALL:
overwrite_all = true; //fall through
- case KIO::R_OVERWRITE:
+ case TDEIO::R_OVERWRITE:
urlsToDelete.append( (*it).dest );
break;
- case KIO::R_AUTO_SKIP:
+ case TDEIO::R_AUTO_SKIP:
skip_all = true;
- case KIO::R_SKIP: //fall through
+ case TDEIO::R_SKIP: //fall through
it = urls.erase( it );
continue;
break;
@@ -1300,7 +1300,7 @@ void KMainWidget::addTransfers( const KURL::List& src, const TQString& destDir )
}
if ( !dir_accepted )
break;
- } // if(KIO::NetAccess::exists
+ } // if(TDEIO::NetAccess::exists
++it;
} // while ( it != urls.end() )
} // while ( !dir_accepted )
@@ -1921,7 +1921,7 @@ void KMainWidget::slotKonquerorIntegration()
bool bIsKonquiEnable=!ksettings.b_KonquerorIntegration;
ksettings.b_KonquerorIntegration=!ksettings.b_KonquerorIntegration;
- KConfig cfg("konquerorrc", false, false);
+ TDEConfig cfg("konquerorrc", false, false);
cfg.setGroup("HTML Settings");
cfg.writePathEntry("DownloadManager",TQString((bIsKonquiEnable)?"kget":""));
cfg.sync();
@@ -2147,7 +2147,7 @@ void KMainWidget::updateStatusBar()
TQString tmpstr;
int totalFiles = 0;
- KIO::filesize_t totalSize = 0;
+ TDEIO::filesize_t totalSize = 0;
int totalSpeed = 0;
unsigned int remTime = 0;
@@ -2168,9 +2168,9 @@ void KMainWidget::updateStatusBar()
statusBar()->changeItem(i18n(" Transfers: %1 ").arg(myTransferList->childCount()), ID_TOTAL_TRANSFERS);
statusBar()->changeItem(i18n(" Files: %1 ").arg(totalFiles), ID_TOTAL_FILES);
- statusBar()->changeItem(i18n(" Size: %1 ").arg(KIO::convertSize(totalSize)), ID_TOTAL_SIZE);
- statusBar()->changeItem(i18n(" Time: %1 ").arg(KIO::convertSeconds(remTime)), ID_TOTAL_TIME);
- statusBar()->changeItem(i18n(" %1/s ").arg(KIO::convertSize(totalSpeed)), ID_TOTAL_SPEED);
+ statusBar()->changeItem(i18n(" Size: %1 ").arg(TDEIO::convertSize(totalSize)), ID_TOTAL_SIZE);
+ statusBar()->changeItem(i18n(" Time: %1 ").arg(TDEIO::convertSeconds(remTime)), ID_TOTAL_TIME);
+ statusBar()->changeItem(i18n(" %1/s ").arg(TDEIO::convertSize(totalSpeed)), ID_TOTAL_SPEED);
//update size for each statusbar field
statusBar()->setItemFixed(ID_TOTAL_TRANSFERS, -1);
statusBar()->setItemFixed(ID_TOTAL_FILES, -1);
@@ -2181,9 +2181,9 @@ void KMainWidget::updateStatusBar()
if (kdock) {
tmpstr = i18n("<b>Transfers:</b> %1 ").arg(myTransferList->childCount()) +
i18n("<br /><b>Files:</b> %1 ").arg(totalFiles) +
- i18n("<br /><b>Size:</b> %1 ").arg(KIO::convertSize(totalSize)) +
- i18n("<br /><b>Time:</b> %1 ").arg(KIO::convertSeconds(remTime)) +
- i18n("<br /><b>Speed:</b> %1/s").arg(KIO::convertSize(totalSpeed));
+ i18n("<br /><b>Size:</b> %1 ").arg(TDEIO::convertSize(totalSize)) +
+ i18n("<br /><b>Time:</b> %1 ").arg(TDEIO::convertSeconds(remTime)) +
+ i18n("<br /><b>Speed:</b> %1/s").arg(TDEIO::convertSize(totalSpeed));
kdock->updateToolTip( tmpstr );
//trayicon changes if download is in progress
if (totalSpeed == 0)
diff --git a/kget/safedelete.cpp b/kget/safedelete.cpp
index 16deb1dd..d6b2d138 100644
--- a/kget/safedelete.cpp
+++ b/kget/safedelete.cpp
@@ -21,7 +21,7 @@ bool SafeDelete::deleteFile( const KURL& url )
return false;
}
- KIO::NetAccess::del( url, 0L );
+ TDEIO::NetAccess::del( url, 0L );
return true;
}
diff --git a/kget/settings.cpp b/kget/settings.cpp
index 4186784e..efc0086c 100644
--- a/kget/settings.cpp
+++ b/kget/settings.cpp
@@ -59,7 +59,7 @@ Settings::load()
{
sDebug << "Loading settings" << endl;
- KConfig *config = kapp->config();
+ TDEConfig *config = kapp->config();
// read system options
config->setGroup("System");
@@ -118,7 +118,7 @@ Settings::load()
// read if the integration whith konqueror is enabled
- KConfig *cfg = new KConfig("konquerorrc", false, false);
+ TDEConfig *cfg = new TDEConfig("konquerorrc", false, false);
cfg->setGroup("HTML Settings");
TQString downloadManager=cfg->readPathEntry("DownloadManager");
@@ -196,7 +196,7 @@ void Settings::save()
{
sDebug << "Saving settings" << endl;
- KConfig *config = kapp->config();
+ TDEConfig *config = kapp->config();
// write connection options
config->setGroup("Connection");
diff --git a/kget/slave.cpp b/kget/slave.cpp
index 0a1fa766..df0846d4 100644
--- a/kget/slave.cpp
+++ b/kget/slave.cpp
@@ -117,8 +117,8 @@ void Slave::run()
case RETR:
mDebug << " FETCHED COMMAND RETR" << endl;
assert(!copyjob);
- KIO::Scheduler::checkSlaveOnHold( true );
- copyjob = new KIO::GetFileJob(m_src, m_dest);
+ TDEIO::Scheduler::checkSlaveOnHold( true );
+ copyjob = new TDEIO::GetFileJob(m_src, m_dest);
Connect();
PostMessage(SLV_RESUMED);
break;
@@ -126,8 +126,8 @@ void Slave::run()
case RETR_CACHE:
mDebug << " FETCHED COMMAND RETR_CACHE" << endl;
assert(!copyjob);
- KIO::Scheduler::checkSlaveOnHold( true );
- copyjob = new KIO::GetFileJob(m_src, m_dest);
+ TDEIO::Scheduler::checkSlaveOnHold( true );
+ copyjob = new TDEIO::GetFileJob(m_src, m_dest);
copyjob->addMetaData("cache", "cacheonly");
Connect();
break;
@@ -218,23 +218,23 @@ void Slave::Connect()
mDebugIn << endl;
- connect(copyjob, TQT_SIGNAL(canceled(KIO::Job *)), TQT_SLOT(slotCanceled(KIO::Job *)));
- connect(copyjob, TQT_SIGNAL(connected(KIO::Job *)), TQT_SLOT(slotConnected(KIO::Job *)));
- connect(copyjob, TQT_SIGNAL(result(KIO::Job *)), TQT_SLOT(slotResult(KIO::Job *)));
+ connect(copyjob, TQT_SIGNAL(canceled(TDEIO::Job *)), TQT_SLOT(slotCanceled(TDEIO::Job *)));
+ connect(copyjob, TQT_SIGNAL(connected(TDEIO::Job *)), TQT_SLOT(slotConnected(TDEIO::Job *)));
+ connect(copyjob, TQT_SIGNAL(result(TDEIO::Job *)), TQT_SLOT(slotResult(TDEIO::Job *)));
- connect(copyjob, TQT_SIGNAL(totalSize(KIO::Job *, KIO::filesize_t)), TQT_SLOT(slotTotalSize(KIO::Job *, KIO::filesize_t)));
+ connect(copyjob, TQT_SIGNAL(totalSize(TDEIO::Job *, TDEIO::filesize_t)), TQT_SLOT(slotTotalSize(TDEIO::Job *, TDEIO::filesize_t)));
- connect(copyjob, TQT_SIGNAL(processedSize(KIO::Job *, KIO::filesize_t)), TQT_SLOT(slotProcessedSize(KIO::Job *, KIO::filesize_t)));
+ connect(copyjob, TQT_SIGNAL(processedSize(TDEIO::Job *, TDEIO::filesize_t)), TQT_SLOT(slotProcessedSize(TDEIO::Job *, TDEIO::filesize_t)));
- connect(copyjob, TQT_SIGNAL(speed(KIO::Job *, unsigned long)), TQT_SLOT(slotSpeed(KIO::Job *, unsigned long)));
+ connect(copyjob, TQT_SIGNAL(speed(TDEIO::Job *, unsigned long)), TQT_SLOT(slotSpeed(TDEIO::Job *, unsigned long)));
- connect(copyjob, TQT_SIGNAL(infoMessage(KIO::Job *, const TQString &)), TQT_SLOT(slotInfoMessage(KIO::Job *, const TQString &)));
+ connect(copyjob, TQT_SIGNAL(infoMessage(TDEIO::Job *, const TQString &)), TQT_SLOT(slotInfoMessage(TDEIO::Job *, const TQString &)));
mDebugOut << endl;
}
-void Slave::slotCanceled(KIO::Job *)
+void Slave::slotCanceled(TDEIO::Job *)
{
mDebugIn << endl;
@@ -242,7 +242,7 @@ void Slave::slotCanceled(KIO::Job *)
mDebugOut << endl;
}
-void Slave::slotConnected(KIO::Job *)
+void Slave::slotConnected(TDEIO::Job *)
{
mDebugIn << endl;
@@ -250,13 +250,13 @@ void Slave::slotConnected(KIO::Job *)
mDebugOut << endl;
}
-void Slave::slotResult(KIO::Job * job)
+void Slave::slotResult(TDEIO::Job * job)
{
mDebugIn << endl;
assert(copyjob == job);
copyjob=0L;
- KIO::Error error=KIO::Error(job->error());
+ TDEIO::Error error=TDEIO::Error(job->error());
if (!error) {
PostMessage(SLV_FINISHED);
}
@@ -270,11 +270,11 @@ void Slave::slotResult(KIO::Job * job)
"</b></font>";
InfoMessage(tmsg);
if (m_parent->retryOnError() && \
- ((error==KIO::ERR_COULD_NOT_LOGIN) || (error==KIO::ERR_SERVER_TIMEOUT))) {
+ ((error==TDEIO::ERR_COULD_NOT_LOGIN) || (error==TDEIO::ERR_SERVER_TIMEOUT))) {
//Timeout or login error
PostMessage(SLV_ERROR);
}
- else if (m_parent->retryOnBroken() && (error==KIO::ERR_CONNECTION_BROKEN)) {
+ else if (m_parent->retryOnBroken() && (error==TDEIO::ERR_CONNECTION_BROKEN)) {
// Connection Broken
PostMessage(SLV_BROKEN);
}
@@ -287,7 +287,7 @@ void Slave::slotResult(KIO::Job * job)
}
-void Slave::slotSpeed(KIO::Job *, unsigned long lSpeed)
+void Slave::slotSpeed(TDEIO::Job *, unsigned long lSpeed)
{
// mDebugIn<<endl;
PostMessage(SLV_PROGRESS_SPEED, lSpeed);
@@ -295,7 +295,7 @@ void Slave::slotSpeed(KIO::Job *, unsigned long lSpeed)
}
-void Slave::slotTotalSize(KIO::Job *, KIO::filesize_t _total_size)
+void Slave::slotTotalSize(TDEIO::Job *, TDEIO::filesize_t _total_size)
{
mDebugIn << "= " << _total_size << endl;
@@ -313,7 +313,7 @@ void Slave::slotTotalSize(KIO::Job *, KIO::filesize_t _total_size)
mDebugOut << endl;
}
-void Slave::slotProcessedSize(KIO::Job *, KIO::filesize_t _processed_size)
+void Slave::slotProcessedSize(TDEIO::Job *, TDEIO::filesize_t _processed_size)
{
// mDebugIn<<endl;
PostMessage(SLV_PROGRESS_SIZE, _processed_size);
@@ -321,7 +321,7 @@ void Slave::slotProcessedSize(KIO::Job *, KIO::filesize_t _processed_size)
// mDebugOut<<endl;
}
-void Slave::slotInfoMessage(KIO::Job *, const TQString & _msg)
+void Slave::slotInfoMessage(TDEIO::Job *, const TQString & _msg)
{
mDebugIn << "MSG=" << _msg << endl;
InfoMessage(_msg);
diff --git a/kget/slave.h b/kget/slave.h
index bab0783d..cca9df86 100644
--- a/kget/slave.h
+++ b/kget/slave.h
@@ -36,7 +36,7 @@
#include "common.h"
-namespace KIO
+namespace TDEIO
{
class GetFileJob;
}
@@ -72,13 +72,13 @@ protected:
virtual void run();
private slots:
- void slotCanceled(KIO::Job *);
- void slotConnected(KIO::Job *);
- void slotResult(KIO::Job *);
- void slotTotalSize(KIO::Job *, KIO::filesize_t);
- void slotProcessedSize(KIO::Job *, KIO::filesize_t);
- void slotSpeed(KIO::Job *, unsigned long);
- void slotInfoMessage(KIO::Job *, const TQString &);
+ void slotCanceled(TDEIO::Job *);
+ void slotConnected(TDEIO::Job *);
+ void slotResult(TDEIO::Job *);
+ void slotTotalSize(TDEIO::Job *, TDEIO::filesize_t);
+ void slotProcessedSize(TDEIO::Job *, TDEIO::filesize_t);
+ void slotSpeed(TDEIO::Job *, unsigned long);
+ void slotInfoMessage(TDEIO::Job *, const TQString &);
private:
void Connect();
@@ -98,7 +98,7 @@ private:
TQValueStack < SlaveCommand > stack;
TQWaitCondition worker;
TQMutex mutex;
- KIO::GetFileJob * copyjob;
+ TDEIO::GetFileJob * copyjob;
};
diff --git a/kget/transfer.cpp b/kget/transfer.cpp
index 0043291d..218a5561 100644
--- a/kget/transfer.cpp
+++ b/kget/transfer.cpp
@@ -259,8 +259,8 @@ void Transfer::setSpeed(unsigned long _speed)
// sDebugIn <<endl;
speed = _speed;
- remainingTimeSec = KIO::calculateRemainingSeconds(totalSize, processedSize, speed);
- remainingTime = KIO::convertSeconds(remainingTimeSec);
+ remainingTimeSec = TDEIO::calculateRemainingSeconds(totalSize, processedSize, speed);
+ remainingTime = TDEIO::convertSeconds(remainingTimeSec);
//sDebugOut <<endl;
}
@@ -292,7 +292,7 @@ void Transfer::updateAll()
if (totalSize != 0) {
//logMessage(i18n("Total size is %1 bytes").arg((double)totalSize));
- setText(view->lv_total, KIO::convertSize(totalSize));
+ setText(view->lv_total, TDEIO::convertSize(totalSize));
} else {
//logMessage(i18n("Total size is unknown"));
setText(view->lv_total, i18n("unknown"));
@@ -472,7 +472,7 @@ void Transfer::slotRequestRemove()
// delete the partly downloaded file, if any
file.setFileName( dest.fileName() + ".part" ); // ### get it from the job?
- if ( KIO::NetAccess::exists( file, false, view ) ) // don't pollute user with warnings
+ if ( TDEIO::NetAccess::exists( file, false, view ) ) // don't pollute user with warnings
{
SafeDelete::deleteFile( file ); // ### messagebox on failure?
}
@@ -544,7 +544,7 @@ void Transfer::slotRequestDelay()
/*
-void Transfer::slotCanceled(KIO::Job *)
+void Transfer::slotCanceled(TDEIO::Job *)
{
sDebugIn << endl;
@@ -575,7 +575,7 @@ void Transfer::slotFinished()
/*
-void Transfer::slotRenaming(KIO::Job *, const KURL &, const KURL & to)
+void Transfer::slotRenaming(TDEIO::Job *, const KURL &, const KURL & to)
{
sDebugIn << endl;
@@ -623,7 +623,7 @@ void Transfer::slotSpeed(unsigned long bytes_per_second)
dlgIndividual->setSpeed(i18n("Stopped"));
} else {
- TQString tmps = i18n("%1/s").arg(KIO::convertSize(speed));
+ TQString tmps = i18n("%1/s").arg(TDEIO::convertSize(speed));
setText(view->lv_speed, tmps);
setText(view->lv_remaining, remainingTime);
if(dlgIndividual)
@@ -635,7 +635,7 @@ void Transfer::slotSpeed(unsigned long bytes_per_second)
-void Transfer::slotTotalSize(KIO::filesize_t bytes)
+void Transfer::slotTotalSize(TDEIO::filesize_t bytes)
{
#ifdef _DEBUG
sDebugIn<<" totalSize is = "<<totalSize << endl;
@@ -645,7 +645,7 @@ void Transfer::slotTotalSize(KIO::filesize_t bytes)
totalSize = bytes;
if (totalSize != 0) {
logMessage(i18n("Total size is %1 bytes").arg((double)totalSize,0,'f',0));
- setText(view->lv_total, KIO::convertSize(totalSize));
+ setText(view->lv_total, TDEIO::convertSize(totalSize));
if(dlgIndividual)
{
dlgIndividual->setTotalSize(totalSize);
@@ -672,7 +672,7 @@ void Transfer::slotTotalSize(KIO::filesize_t bytes)
-void Transfer::slotProcessedSize(KIO::filesize_t bytes)
+void Transfer::slotProcessedSize(TDEIO::filesize_t bytes)
{
//sDebug<< ">>>>Entering"<<endl;
@@ -688,7 +688,7 @@ void Transfer::slotProcessedSize(KIO::filesize_t bytes)
percent = 99; // what can we say?
totalSize = processedSize;
- setText(view->lv_total, KIO::convertSize(totalSize));
+ setText(view->lv_total, TDEIO::convertSize(totalSize));
if(dlgIndividual)
dlgIndividual->setTotalSize(totalSize);
}
diff --git a/kget/transfer.h b/kget/transfer.h
index b9cbf6d6..7c8eb7f5 100644
--- a/kget/transfer.h
+++ b/kget/transfer.h
@@ -88,11 +88,11 @@ public:
return remainingTimeSec;
}
- KIO::filesize_t getTotalSize()const
+ TDEIO::filesize_t getTotalSize()const
{
return totalSize;
}
- KIO::filesize_t getProcessedSize()const
+ TDEIO::filesize_t getProcessedSize()const
{
return processedSize;
}
@@ -183,8 +183,8 @@ public slots:
void slotQueue();
void slotFinished();
- void slotTotalSize(KIO::filesize_t bytes);
- void slotProcessedSize(KIO::filesize_t);
+ void slotTotalSize(TDEIO::filesize_t bytes);
+ void slotProcessedSize(TDEIO::filesize_t);
void slotStartTime(const TQDateTime &);
void slotStop(); // stop all transfers when going offline
@@ -212,8 +212,8 @@ private:
// schedule time
TQDateTime startTime;
- KIO::filesize_t totalSize;
- KIO::filesize_t processedSize;
+ TDEIO::filesize_t totalSize;
+ TDEIO::filesize_t processedSize;
int percent;
int speed;
diff --git a/kget/transferlist.cpp b/kget/transferlist.cpp
index 62384f07..60d62943 100644
--- a/kget/transferlist.cpp
+++ b/kget/transferlist.cpp
@@ -76,7 +76,7 @@ TransferList::TransferList(TQWidget * parent, const char *name)
jobid=1;
// initial layout
- KConfig *config = TDEGlobal::config();
+ TDEConfig *config = TDEGlobal::config();
config->setGroup("ListView");
if ( config->readListEntry("ColumnWidths").isEmpty() )
{
@@ -229,7 +229,7 @@ void TransferList::readTransfers(const KURL& file)
{
TQString tmpFile;
- if (KIO::NetAccess::download(file, tmpFile, (TQWidget*)parent())) {
+ if (TDEIO::NetAccess::download(file, tmpFile, (TQWidget*)parent())) {
KSimpleConfig config(tmpFile);
config.setGroup("Common");