diff --git a/ChangeLog b/ChangeLog index 2156d72..601383a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -18,7 +18,7 @@ Changes in 2.2.6 : - Added patch from carucciio to load torrents silently from the command line - Set output_path of torrent as default location when the users selects set download location in the viewmenu (157486) - Torrents with no file selected are now always shown as download -- Ditch KIO::NetAccess when moving data files (157462) +- Ditch TDEIO::NetAccess when moving data files (157462) - Fix stop all and start all from system tray menu (it used to apply to the current view, now it applies to all torrents) (157991) - Make sure that set download location and add to group are disabled when no torrent is selected - Fix ktshell when there are multiple dcop sessions (158115) diff --git a/apps/ktorrent/README b/apps/ktorrent/README index 318bd72..69e9ac5 100644 --- a/apps/ktorrent/README +++ b/apps/ktorrent/README @@ -42,7 +42,7 @@ For more details, consult : http://devel-home.kde.org/~larrosa/tutorial/p9.html http://developer.kde.org/documentation/tutorials/xmlui/preface.html -* Use KConfig XT to create your configuration dialogs and make +* Use TDEConfig XT to create your configuration dialogs and make them more maintainable. For more details, consult : diff --git a/apps/ktorrent/filterbar.cpp b/apps/ktorrent/filterbar.cpp index 6084e66..6df556b 100644 --- a/apps/ktorrent/filterbar.cpp +++ b/apps/ktorrent/filterbar.cpp @@ -76,14 +76,14 @@ FilterBar::~FilterBar() { } -void FilterBar::saveSettings(KConfig* cfg) +void FilterBar::saveSettings(TDEConfig* cfg) { cfg->writeEntry("filter_bar_hidden",isHidden()); cfg->writeEntry("filter_bar_text",m_name_filter); cfg->writeEntry("filter_bar_case_sensitive",m_case_sensitive->isChecked()); } -void FilterBar::loadSettings(KConfig* cfg) +void FilterBar::loadSettings(TDEConfig* cfg) { setHidden(cfg->readBoolEntry("filter_bar_hidden",true)); m_case_sensitive->setChecked(cfg->readBoolEntry("filter_bar_case_sensitive",true)); diff --git a/apps/ktorrent/filterbar.h b/apps/ktorrent/filterbar.h index 06743ff..7cb4282 100644 --- a/apps/ktorrent/filterbar.h +++ b/apps/ktorrent/filterbar.h @@ -24,7 +24,7 @@ class TQLabel; class TQCheckBox; -class KConfig; +class TDEConfig; class KLineEdit; class KPushButton; class KToolBarButton; @@ -49,8 +49,8 @@ public: virtual ~FilterBar(); bool matchesFilter(kt::TorrentInterface* tc); - void saveSettings(KConfig* cfg); - void loadSettings(KConfig* cfg); + void saveSettings(TDEConfig* cfg); + void loadSettings(TDEConfig* cfg); private slots: void slotChangeFilter(const TQString& nameFilter); diff --git a/apps/ktorrent/ktorrent.cpp b/apps/ktorrent/ktorrent.cpp index d492f02..651f9c6 100644 --- a/apps/ktorrent/ktorrent.cpp +++ b/apps/ktorrent/ktorrent.cpp @@ -763,11 +763,11 @@ void KTorrent::changeCaption(const TQString& text) setCaption(text); } -void KTorrent::saveProperties(KConfig* ) +void KTorrent::saveProperties(TDEConfig* ) { } -void KTorrent::readProperties(KConfig*) +void KTorrent::readProperties(TDEConfig*) { } diff --git a/apps/ktorrent/ktorrent.h b/apps/ktorrent/ktorrent.h index f32641a..fff305f 100644 --- a/apps/ktorrent/ktorrent.h +++ b/apps/ktorrent/ktorrent.h @@ -141,14 +141,14 @@ protected: * This function is called when it is time for the app to save its * properties for session management purposes. */ - void saveProperties(KConfig *); + void saveProperties(TDEConfig *); /** - * This function is called when this app is restored. The KConfig + * This function is called when this app is restored. The TDEConfig * object points to the session management config file that was saved * with @ref saveProperties */ - void readProperties(KConfig *); + void readProperties(TDEConfig *); private slots: diff --git a/apps/ktorrent/ktorrentcore.cpp b/apps/ktorrent/ktorrentcore.cpp index ac04a79..c7c9c81 100644 --- a/apps/ktorrent/ktorrentcore.cpp +++ b/apps/ktorrent/ktorrentcore.cpp @@ -282,11 +282,11 @@ bool KTorrentCore::load(const TQString & target,const TQString & dir,bool silent } } -void KTorrentCore::downloadFinished(KIO::Job *job) +void KTorrentCore::downloadFinished(TDEIO::Job *job) { - KIO::StoredTransferJob* j = (KIO::StoredTransferJob*)job; + TDEIO::StoredTransferJob* j = (TDEIO::StoredTransferJob*)job; int err = j->error(); - if (err == KIO::ERR_USER_CANCELED) + if (err == TDEIO::ERR_USER_CANCELED) { loadingFinished(j->url(),false,true); return; @@ -327,16 +327,16 @@ void KTorrentCore::load(const KURL& url) } else { - KIO::Job* j = KIO::storedGet(url,false,true); - connect(j,TQT_SIGNAL(result(KIO::Job*)),this,TQT_SLOT(downloadFinished( KIO::Job* ))); + TDEIO::Job* j = TDEIO::storedGet(url,false,true); + connect(j,TQT_SIGNAL(result(TDEIO::Job*)),this,TQT_SLOT(downloadFinished( TDEIO::Job* ))); } } -void KTorrentCore::downloadFinishedSilently(KIO::Job *job) +void KTorrentCore::downloadFinishedSilently(TDEIO::Job *job) { - KIO::StoredTransferJob* j = (KIO::StoredTransferJob*)job; + TDEIO::StoredTransferJob* j = (TDEIO::StoredTransferJob*)job; int err = j->error(); - if (err == KIO::ERR_USER_CANCELED) + if (err == TDEIO::ERR_USER_CANCELED) { loadingFinished(j->url(),false,true); } @@ -394,8 +394,8 @@ void KTorrentCore::loadSilently(const KURL& url) else { // download to a random file in tmp - KIO::Job* j = KIO::storedGet(url,false,true); - connect(j,TQT_SIGNAL(result(KIO::Job*)),this,TQT_SLOT(downloadFinishedSilently( KIO::Job* ))); + TDEIO::Job* j = TDEIO::storedGet(url,false,true); + connect(j,TQT_SIGNAL(result(TDEIO::Job*)),this,TQT_SLOT(downloadFinishedSilently( TDEIO::Job* ))); } } @@ -425,9 +425,9 @@ void KTorrentCore::loadSilentlyDir(const KURL& url, const KURL& savedir) else { // download to a random file in tmp - KIO::Job* j = KIO::storedGet(url,false,true); + TDEIO::Job* j = TDEIO::storedGet(url,false,true); custom_save_locations.insert(j,savedir); // keep track of save location - connect(j,TQT_SIGNAL(result(KIO::Job*)),this,TQT_SLOT(downloadFinishedSilently( KIO::Job* ))); + connect(j,TQT_SIGNAL(result(TDEIO::Job*)),this,TQT_SLOT(downloadFinishedSilently( TDEIO::Job* ))); } } diff --git a/apps/ktorrent/ktorrentcore.h b/apps/ktorrent/ktorrentcore.h index f17cb89..8e25653 100644 --- a/apps/ktorrent/ktorrentcore.h +++ b/apps/ktorrent/ktorrentcore.h @@ -35,7 +35,7 @@ namespace bt class TorrentControl; } -namespace KIO +namespace TDEIO { class Job; } @@ -339,8 +339,8 @@ private slots: void torrentFinished(kt::TorrentInterface* tc); void slotStoppedByError(kt::TorrentInterface* tc, TQString msg); void torrentSeedAutoStopped(kt::TorrentInterface* tc,kt::AutoStopReason reason); - void downloadFinished(KIO::Job *job); - void downloadFinishedSilently(KIO::Job *job); + void downloadFinished(TDEIO::Job *job); + void downloadFinishedSilently(TDEIO::Job *job); void emitCorruptedData(kt::TorrentInterface* tc); private: @@ -352,7 +352,7 @@ private: kt::PluginManager* pman; bt::QueueManager* qman; kt::GroupManager* gman; - TQMap custom_save_locations; // map to store save locations + TQMap custom_save_locations; // map to store save locations }; #endif diff --git a/apps/ktorrent/ktorrentview.cpp b/apps/ktorrent/ktorrentview.cpp index 447eaee..6dd7c67 100644 --- a/apps/ktorrent/ktorrentview.cpp +++ b/apps/ktorrent/ktorrentview.cpp @@ -206,7 +206,7 @@ void KTorrentView::setCurrentGroup(Group* group) onExecuted(view->currentItem()); } -void KTorrentView::saveSettings(KConfig* cfg,int idx) +void KTorrentView::saveSettings(TDEConfig* cfg,int idx) { TQString group = TQString("KTorrentView-%1").arg(idx); view->saveLayout(cfg,group); @@ -215,7 +215,7 @@ void KTorrentView::saveSettings(KConfig* cfg,int idx) } -void KTorrentView::loadSettings(KConfig* cfg,int idx) +void KTorrentView::loadSettings(TDEConfig* cfg,int idx) { TQString group = TQString("KTorrentView-%1").arg(idx); view->restoreLayout(cfg,group); diff --git a/apps/ktorrent/ktorrentview.h b/apps/ktorrent/ktorrentview.h index 1355baa..b822a77 100644 --- a/apps/ktorrent/ktorrentview.h +++ b/apps/ktorrent/ktorrentview.h @@ -101,10 +101,10 @@ public: kt::TorrentInterface* getCurrentTC(); /// Save the views settings - void saveSettings(KConfig* cfg,int idx); + void saveSettings(TDEConfig* cfg,int idx); /// Load the views settings - void loadSettings(KConfig* cfg,int idx); + void loadSettings(TDEConfig* cfg,int idx); /** * Put the current selection in a list. diff --git a/apps/ktorrent/newui/button.cpp b/apps/ktorrent/newui/button.cpp index 78b1f47..28dd724 100644 --- a/apps/ktorrent/newui/button.cpp +++ b/apps/ktorrent/newui/button.cpp @@ -60,7 +60,7 @@ Button::Button(ButtonBar *parent, const TQString text, const TQIconSet &icon, m_clearAccelAction = new KAction(i18n("Clear Accelerator"), 0, TQT_TQOBJECT(this), TQT_SLOT(clearAccel()), TQT_TQOBJECT(this)); - KConfig *config = kapp->config(); + TDEConfig *config = kapp->config(); config->setGroup("UI"); TQString accel = config->readEntry(TQString("button_%1").arg(text), ""); if (!accel.isEmpty()) @@ -70,7 +70,7 @@ Button::Button(ButtonBar *parent, const TQString text, const TQIconSet &icon, Button::~Button() { // m_buttonBar->removeButton(this); - KConfig *config = kapp->config(); + TDEConfig *config = kapp->config(); config->setGroup("UI"); TQRegExp r("^&([0-9])\\s.*"); diff --git a/apps/ktorrent/newui/ddockwindow.cpp b/apps/ktorrent/newui/ddockwindow.cpp index 11482f8..ec53feb 100644 --- a/apps/ktorrent/newui/ddockwindow.cpp +++ b/apps/ktorrent/newui/ddockwindow.cpp @@ -68,7 +68,7 @@ DDockWindow::DDockWindow(DMainWindow *parent, Position position) break; } - KConfig *config = kapp->config(); + TDEConfig *config = kapp->config(); config->setGroup("UI"); int mode = config->readNumEntry("MDIStyle", 3); Ideal::ButtonMode buttonMode = Ideal::Text; @@ -103,7 +103,7 @@ DDockWindow::~DDockWindow() void DDockWindow::setVisible(bool v) { //write dock width to the config file - KConfig *config = kapp->config(); + TDEConfig *config = kapp->config(); TQString group = TQString("%1").arg(m_name); config->setGroup(group); @@ -147,7 +147,7 @@ void DDockWindow::loadSettings() void DDockWindow::saveSettings() { - KConfig *config = kapp->config(); + TDEConfig *config = kapp->config(); TQString group = TQString("%1").arg(m_name); int invisibleWidth = 0; config->setGroup(group); @@ -199,7 +199,7 @@ void DDockWindow::addWidget(const TQString &title, TQWidget *widget, bool skipAc { //if the widget was selected last time the dock is deleted //we need to show it - KConfig *config = kapp->config(); + TDEConfig *config = kapp->config(); TQString group = TQString("%1").arg(m_name); config->setGroup(group); if (config->readEntry("ViewLastWidget") == title) diff --git a/apps/ktorrent/newui/dmainwindow.cpp b/apps/ktorrent/newui/dmainwindow.cpp index 56ee17b..125f083 100644 --- a/apps/ktorrent/newui/dmainwindow.cpp +++ b/apps/ktorrent/newui/dmainwindow.cpp @@ -42,7 +42,7 @@ DMainWindow::DMainWindow(TQWidget *parent, const char *name) void DMainWindow::loadSettings() { - KConfig *config = kapp->config(); + TDEConfig *config = kapp->config(); config->setGroup("UI"); m_openTabAfterCurrent = config->readBoolEntry("OpenNewTabAfterCurrent", true); m_showIconsOnTabs = config->readBoolEntry("ShowTabIcons", false); diff --git a/apps/ktorrent/newui/dtabwidget.cpp b/apps/ktorrent/newui/dtabwidget.cpp index 2176a51..7cf36a5 100644 --- a/apps/ktorrent/newui/dtabwidget.cpp +++ b/apps/ktorrent/newui/dtabwidget.cpp @@ -56,7 +56,7 @@ DTabWidget::DTabWidget(TQWidget *parent, const char *name) void DTabWidget::loadSettings() { /* - KConfig *config = kapp->config(); + TDEConfig *config = kapp->config(); config->setGroup("UI"); // m_tabBarShown = config->readBoolEntry("TabBarShown", true); m_tabBarShown = ! config->readNumEntry("TabWidgetVisibility", 0); diff --git a/apps/ktorrent/viewmanager.cpp b/apps/ktorrent/viewmanager.cpp index 2d75635..45a99a0 100644 --- a/apps/ktorrent/viewmanager.cpp +++ b/apps/ktorrent/viewmanager.cpp @@ -43,7 +43,7 @@ KTorrentView* ViewManager::newView() return v; } -void ViewManager::saveViewState(KConfig* cfg) +void ViewManager::saveViewState(TDEConfig* cfg) { TQStringList cv; int idx = 0; @@ -56,7 +56,7 @@ void ViewManager::saveViewState(KConfig* cfg) cfg->writeEntry("current_views",cv); } -void ViewManager::restoreViewState(KConfig* cfg,KTorrent* ktor) +void ViewManager::restoreViewState(TDEConfig* cfg,KTorrent* ktor) { TQStringList def; def.append(i18n("Downloads")); diff --git a/apps/ktorrent/viewmanager.h b/apps/ktorrent/viewmanager.h index 1c959aa..67025aa 100644 --- a/apps/ktorrent/viewmanager.h +++ b/apps/ktorrent/viewmanager.h @@ -24,7 +24,7 @@ #include #include -class KConfig; +class TDEConfig; class KTabWidget; class KTorrentView; class KTorrent; @@ -44,10 +44,10 @@ public: KTorrentView* newView(); /// Save all views - void saveViewState(KConfig* cfg); + void saveViewState(TDEConfig* cfg); /// Restore all views from configuration - void restoreViewState(KConfig* cfg,KTorrent* ktor); + void restoreViewState(TDEConfig* cfg,KTorrent* ktor); /// Start all selected downloads in the current view void startDownloads(); diff --git a/libktorrent/interfaces/exitoperation.cpp b/libktorrent/interfaces/exitoperation.cpp index 08a39df..fd9883f 100644 --- a/libktorrent/interfaces/exitoperation.cpp +++ b/libktorrent/interfaces/exitoperation.cpp @@ -29,16 +29,16 @@ namespace kt ExitOperation::~ExitOperation() {} - ExitJobOperation::ExitJobOperation(KIO::Job* j) + ExitJobOperation::ExitJobOperation(TDEIO::Job* j) { - connect(j,TQT_SIGNAL(result(KIO::Job*)),this,TQT_SLOT(onResult( KIO::Job* ))); + connect(j,TQT_SIGNAL(result(TDEIO::Job*)),this,TQT_SLOT(onResult( TDEIO::Job* ))); } ExitJobOperation::~ExitJobOperation() { } - void ExitJobOperation::onResult(KIO::Job* ) + void ExitJobOperation::onResult(TDEIO::Job* ) { operationFinished(this); } diff --git a/libktorrent/interfaces/exitoperation.h b/libktorrent/interfaces/exitoperation.h index 631acb4..e45dab4 100644 --- a/libktorrent/interfaces/exitoperation.h +++ b/libktorrent/interfaces/exitoperation.h @@ -50,19 +50,19 @@ namespace kt }; /** - * Exit operation which waits for a KIO::Job + * Exit operation which waits for a TDEIO::Job */ class ExitJobOperation : public ExitOperation { Q_OBJECT public: - ExitJobOperation(KIO::Job* j); + ExitJobOperation(TDEIO::Job* j); virtual ~ExitJobOperation(); virtual bool deleteAllowed() const {return false;} private slots: - virtual void onResult(KIO::Job* j); + virtual void onResult(TDEIO::Job* j); }; } diff --git a/libktorrent/kademlia/rpcmsg.h b/libktorrent/kademlia/rpcmsg.h index 68a3367..58f6891 100644 --- a/libktorrent/kademlia/rpcmsg.h +++ b/libktorrent/kademlia/rpcmsg.h @@ -86,13 +86,13 @@ namespace dht virtual void encode(TQByteArray & arr) = 0; /// Set the origin (i.e. where the message came from) - void setOrigin(const KNetwork::KSocketAddress & o) {origin = o;} + void setOrigin(const KNetwork::TDESocketAddress & o) {origin = o;} /// Get the origin const KNetwork::KInetSocketAddress & getOrigin() const {return origin;} /// Set the origin (i.e. where the message came from) - void setDestination(const KNetwork::KSocketAddress & o) {origin = o;} + void setDestination(const KNetwork::TDESocketAddress & o) {origin = o;} /// Get the origin const KNetwork::KInetSocketAddress & getDestination() const {return origin;} diff --git a/libktorrent/kademlia/rpcserver.cpp b/libktorrent/kademlia/rpcserver.cpp index 8839de2..571d4d8 100644 --- a/libktorrent/kademlia/rpcserver.cpp +++ b/libktorrent/kademlia/rpcserver.cpp @@ -157,7 +157,7 @@ namespace dht } - void RPCServer::send(const KNetwork::KSocketAddress & addr,const TQByteArray & msg) + void RPCServer::send(const KNetwork::TDESocketAddress & addr,const TQByteArray & msg) { sock->send(KNetwork::KDatagramPacket(msg,addr)); } @@ -230,7 +230,7 @@ namespace dht return calls.find(mtid); } - void RPCServer::ping(const dht::Key & our_id,const KNetwork::KSocketAddress & addr) + void RPCServer::ping(const dht::Key & our_id,const KNetwork::TDESocketAddress & addr) { Out(SYS_DHT|LOG_NOTICE) << "DHT: pinging " << addr.nodeName() << endl; PingReq* pr = new PingReq(our_id); diff --git a/libktorrent/kademlia/rpcserver.h b/libktorrent/kademlia/rpcserver.h index 387daee..b555fb4 100644 --- a/libktorrent/kademlia/rpcserver.h +++ b/libktorrent/kademlia/rpcserver.h @@ -91,7 +91,7 @@ namespace dht * Ping a node, we don't care about the MTID. * @param addr The address */ - void ping(const dht::Key & our_id,const KNetwork::KSocketAddress & addr); + void ping(const dht::Key & our_id,const KNetwork::TDESocketAddress & addr); /** * Find a RPC call, based on the mtid @@ -106,7 +106,7 @@ namespace dht void readPacket(); private: - void send(const KNetwork::KSocketAddress & addr,const TQByteArray & msg); + void send(const KNetwork::TDESocketAddress & addr,const TQByteArray & msg); void doQueuedCalls(); private: diff --git a/libktorrent/torrent/cache.h b/libktorrent/torrent/cache.h index 8630bc7..1aff44b 100644 --- a/libktorrent/torrent/cache.h +++ b/libktorrent/torrent/cache.h @@ -70,15 +70,15 @@ namespace bt /** * Move the data files to a new directory. * @param ndir The directory - * @return The KIO::Job doing the move + * @return The TDEIO::Job doing the move */ - virtual KIO::Job* moveDataFiles(const TQString & ndir) = 0; + virtual TDEIO::Job* moveDataFiles(const TQString & ndir) = 0; /** * The move data files job is done. * @param job The job that did it */ - virtual void moveDataFilesCompleted(KIO::Job* job) = 0; + virtual void moveDataFilesCompleted(TDEIO::Job* job) = 0; /** * Changes output path. All data files should already been moved. diff --git a/libktorrent/torrent/chunkmanager.cpp b/libktorrent/torrent/chunkmanager.cpp index e98c58b..aa50ad8 100644 --- a/libktorrent/torrent/chunkmanager.cpp +++ b/libktorrent/torrent/chunkmanager.cpp @@ -148,12 +148,12 @@ namespace bt file_priority_file = data_dir + "file_priority"; } - KIO::Job* ChunkManager::moveDataFiles(const TQString & ndir) + TDEIO::Job* ChunkManager::moveDataFiles(const TQString & ndir) { return cache->moveDataFiles(ndir); } - void ChunkManager::moveDataFilesCompleted(KIO::Job* job) + void ChunkManager::moveDataFilesCompleted(TDEIO::Job* job) { cache->moveDataFilesCompleted(job); } diff --git a/libktorrent/torrent/chunkmanager.h b/libktorrent/torrent/chunkmanager.h index 19a0a30..fa6491a 100644 --- a/libktorrent/torrent/chunkmanager.h +++ b/libktorrent/torrent/chunkmanager.h @@ -30,7 +30,7 @@ class TQStringList; -namespace KIO +namespace TDEIO { class Job; } @@ -109,13 +109,13 @@ namespace bt * @param ndir The new directory * @return The job doing the move */ - KIO::Job* moveDataFiles(const TQString & ndir); + TDEIO::Job* moveDataFiles(const TQString & ndir); /** * The move data files job has finished * @param job The move job */ - void moveDataFilesCompleted(KIO::Job* job); + void moveDataFilesCompleted(TDEIO::Job* job); /** * Loads the index file. diff --git a/libktorrent/torrent/httptracker.cpp b/libktorrent/torrent/httptracker.cpp index e64f8ce..5bbaae8 100644 --- a/libktorrent/torrent/httptracker.cpp +++ b/libktorrent/torrent/httptracker.cpp @@ -116,18 +116,18 @@ namespace bt scrape_url.setEncodedPathAndQuery(epq); Out(SYS_TRK|LOG_NOTICE) << "Doing scrape request to url : " << scrape_url.prettyURL() << endl; - KIO::MetaData md; + TDEIO::MetaData md; setupMetaData(md); - KIO::StoredTransferJob* j = KIO::storedGet(scrape_url,false,false); + TDEIO::StoredTransferJob* j = TDEIO::storedGet(scrape_url,false,false); // set the meta data j->setMetaData(md); - KIO::Scheduler::scheduleJob(j); + TDEIO::Scheduler::scheduleJob(j); - connect(j,TQT_SIGNAL(result(KIO::Job* )),this,TQT_SLOT(onScrapeResult( KIO::Job* ))); + connect(j,TQT_SIGNAL(result(TDEIO::Job* )),this,TQT_SLOT(onScrapeResult( TDEIO::Job* ))); } - void HTTPTracker::onScrapeResult(KIO::Job* j) + void HTTPTracker::onScrapeResult(TDEIO::Job* j) { if (j->error()) { @@ -135,7 +135,7 @@ namespace bt return; } - KIO::StoredTransferJob* st = (KIO::StoredTransferJob*)j; + TDEIO::StoredTransferJob* st = (TDEIO::StoredTransferJob*)j; BDecoder dec(st->data(),false,0); BNode* n = 0; @@ -355,11 +355,11 @@ namespace bt } - void HTTPTracker::onAnnounceResult(KIO::Job* j) + void HTTPTracker::onAnnounceResult(TDEIO::Job* j) { if (j->error()) { - KIO::StoredTransferJob* st = (KIO::StoredTransferJob*)j; + TDEIO::StoredTransferJob* st = (TDEIO::StoredTransferJob*)j; KURL u = st->url(); active_job = 0; @@ -376,7 +376,7 @@ namespace bt } else { - KIO::StoredTransferJob* st = (KIO::StoredTransferJob*)j; + TDEIO::StoredTransferJob* st = (TDEIO::StoredTransferJob*)j; KURL u = st->url(); active_job = 0; @@ -415,7 +415,7 @@ namespace bt requestFailed(i18n("Invalid tracker URL")); } - void HTTPTracker::setupMetaData(KIO::MetaData & md) + void HTTPTracker::setupMetaData(TDEIO::MetaData & md) { md["UserAgent"] = "ktorrent/" VERSION; md["SendLanguageSettings"] = "false"; @@ -446,14 +446,14 @@ namespace bt void HTTPTracker::doAnnounce(const KURL & u) { Out(SYS_TRK|LOG_NOTICE) << "Doing tracker request to url : " << u.prettyURL() << endl; - KIO::MetaData md; + TDEIO::MetaData md; setupMetaData(md); - KIO::StoredTransferJob* j = KIO::storedGet(u,false,false); + TDEIO::StoredTransferJob* j = TDEIO::storedGet(u,false,false); // set the meta data j->setMetaData(md); - KIO::Scheduler::scheduleJob(j); + TDEIO::Scheduler::scheduleJob(j); - connect(j,TQT_SIGNAL(result(KIO::Job* )),this,TQT_SLOT(onAnnounceResult( KIO::Job* ))); + connect(j,TQT_SIGNAL(result(TDEIO::Job* )),this,TQT_SLOT(onAnnounceResult( TDEIO::Job* ))); active_job = j; requestPending(); diff --git a/libktorrent/torrent/httptracker.h b/libktorrent/torrent/httptracker.h index b9433cd..8457934 100644 --- a/libktorrent/torrent/httptracker.h +++ b/libktorrent/torrent/httptracker.h @@ -23,7 +23,7 @@ #include #include "tracker.h" -namespace KIO +namespace TDEIO { class Job; class MetaData; @@ -55,19 +55,19 @@ namespace bt virtual void scrape(); private slots: - void onAnnounceResult(KIO::Job* j); - void onScrapeResult(KIO::Job* j); + void onAnnounceResult(TDEIO::Job* j); + void onScrapeResult(TDEIO::Job* j); void emitInvalidURLFailure(); private: void doRequest(WaitJob* wjob = 0); bool updateData(const TQByteArray & data); - void setupMetaData(KIO::MetaData & md); + void setupMetaData(TDEIO::MetaData & md); void doAnnounceQueue(); void doAnnounce(const KURL & u); private: - KIO::Job* active_job; + TDEIO::Job* active_job; KURL::List announce_queue; TQString event; Uint32 failures; diff --git a/libktorrent/torrent/movedatafilesjob.cpp b/libktorrent/torrent/movedatafilesjob.cpp index c3fc854..7fc3fa6 100644 --- a/libktorrent/torrent/movedatafilesjob.cpp +++ b/libktorrent/torrent/movedatafilesjob.cpp @@ -23,7 +23,7 @@ namespace bt { - MoveDataFilesJob::MoveDataFilesJob() : KIO::Job(false),err(false),active_job(0) + MoveDataFilesJob::MoveDataFilesJob() : TDEIO::Job(false),err(false),active_job(0) {} @@ -35,12 +35,12 @@ namespace bt todo.insert(src,dst); } - void MoveDataFilesJob::onJobDone(KIO::Job* j) + void MoveDataFilesJob::onJobDone(TDEIO::Job* j) { if (j->error() || err) { if (!err) - m_error = KIO::ERR_INTERNAL; + m_error = TDEIO::ERR_INTERNAL; active_job = 0; if (j->error()) @@ -59,9 +59,9 @@ namespace bt } } - void MoveDataFilesJob::onCanceled(KIO::Job* j) + void MoveDataFilesJob::onCanceled(TDEIO::Job* j) { - m_error = KIO::ERR_USER_CANCELED; + m_error = TDEIO::ERR_USER_CANCELED; active_job = 0; err = true; recover(); @@ -77,12 +77,12 @@ namespace bt } TQMap::iterator i = todo.begin(); - active_job = KIO::move(KURL::fromPathOrURL(i.key()),KURL::fromPathOrURL(i.data()),false); + active_job = TDEIO::move(KURL::fromPathOrURL(i.key()),KURL::fromPathOrURL(i.data()),false); active_src = i.key(); active_dst = i.data(); Out(SYS_GEN|LOG_DEBUG) << "Moving " << active_src << " -> " << active_dst << endl; - connect(active_job,TQT_SIGNAL(result(KIO::Job*)),this,TQT_SLOT(onJobDone(KIO::Job*))); - connect(active_job,TQT_SIGNAL(canceled(KIO::Job*)),this,TQT_SLOT(onCanceled(KIO::Job*))); + connect(active_job,TQT_SIGNAL(result(TDEIO::Job*)),this,TQT_SLOT(onJobDone(TDEIO::Job*))); + connect(active_job,TQT_SIGNAL(canceled(TDEIO::Job*)),this,TQT_SLOT(onCanceled(TDEIO::Job*))); todo.erase(i); } @@ -94,9 +94,9 @@ namespace bt return; } TQMap::iterator i = success.begin(); - active_job = KIO::move(KURL::fromPathOrURL(i.data()),KURL::fromPathOrURL(i.key()),false); - connect(active_job,TQT_SIGNAL(result(KIO::Job*)),this,TQT_SLOT(onJobDone(KIO::Job*))); - connect(active_job,TQT_SIGNAL(canceled(KIO::Job*)),this,TQT_SLOT(onCanceled(KIO::Job*))); + active_job = TDEIO::move(KURL::fromPathOrURL(i.data()),KURL::fromPathOrURL(i.key()),false); + connect(active_job,TQT_SIGNAL(result(TDEIO::Job*)),this,TQT_SLOT(onJobDone(TDEIO::Job*))); + connect(active_job,TQT_SIGNAL(canceled(TDEIO::Job*)),this,TQT_SLOT(onCanceled(TDEIO::Job*))); success.erase(i); } } diff --git a/libktorrent/torrent/movedatafilesjob.h b/libktorrent/torrent/movedatafilesjob.h index 22e7e60..e64a62f 100644 --- a/libktorrent/torrent/movedatafilesjob.h +++ b/libktorrent/torrent/movedatafilesjob.h @@ -27,9 +27,9 @@ namespace bt /** * @author Joris Guisson - * KIO::Job to move all the files of a torrent. + * TDEIO::Job to move all the files of a torrent. */ - class MoveDataFilesJob : public KIO::Job + class MoveDataFilesJob : public TDEIO::Job { Q_OBJECT @@ -50,15 +50,15 @@ namespace bt void startMoving(); private slots: - void onJobDone(KIO::Job* j); - void onCanceled(KIO::Job* j); + void onJobDone(TDEIO::Job* j); + void onCanceled(TDEIO::Job* j); private: void recover(); private: bool err; - KIO::Job* active_job; + TDEIO::Job* active_job; TQString active_src,active_dst; TQMap todo; TQMap success; diff --git a/libktorrent/torrent/multifilecache.cpp b/libktorrent/torrent/multifilecache.cpp index 9d41fb8..c6cd8b7 100644 --- a/libktorrent/torrent/multifilecache.cpp +++ b/libktorrent/torrent/multifilecache.cpp @@ -195,7 +195,7 @@ namespace bt } } - KIO::Job* MultiFileCache::moveDataFiles(const TQString & ndir) + TDEIO::Job* MultiFileCache::moveDataFiles(const TQString & ndir) { if (!bt::Exists(ndir)) bt::MakeDir(ndir); @@ -239,7 +239,7 @@ namespace bt return 0; } - void MultiFileCache::moveDataFilesCompleted(KIO::Job* job) + void MultiFileCache::moveDataFilesCompleted(TDEIO::Job* job) { if (!job->error()) { diff --git a/libktorrent/torrent/multifilecache.h b/libktorrent/torrent/multifilecache.h index ed09525..7de197a 100644 --- a/libktorrent/torrent/multifilecache.h +++ b/libktorrent/torrent/multifilecache.h @@ -55,8 +55,8 @@ namespace bt virtual void open(); virtual TQString getOutputPath() const; virtual void changeOutputPath(const TQString & outputpath); - virtual KIO::Job* moveDataFiles(const TQString & ndir); - virtual void moveDataFilesCompleted(KIO::Job* job); + virtual TDEIO::Job* moveDataFiles(const TQString & ndir); + virtual void moveDataFilesCompleted(TDEIO::Job* job); virtual void preallocateDiskSpace(PreallocationThread* prealloc); virtual bool hasMissingFiles(TQStringList & sl); virtual void deleteDataFiles(); diff --git a/libktorrent/torrent/singlefilecache.cpp b/libktorrent/torrent/singlefilecache.cpp index 8986f98..9df0719 100644 --- a/libktorrent/torrent/singlefilecache.cpp +++ b/libktorrent/torrent/singlefilecache.cpp @@ -52,12 +52,12 @@ namespace bt cache_file = tmpdir + "cache"; } - KIO::Job* SingleFileCache::moveDataFiles(const TQString & ndir) + TDEIO::Job* SingleFileCache::moveDataFiles(const TQString & ndir) { - return KIO::move(KURL::fromPathOrURL(output_file),KURL::fromPathOrURL(ndir)); + return TDEIO::move(KURL::fromPathOrURL(output_file),KURL::fromPathOrURL(ndir)); } - void SingleFileCache::moveDataFilesCompleted(KIO::Job* /*job*/) + void SingleFileCache::moveDataFilesCompleted(TDEIO::Job* /*job*/) { } diff --git a/libktorrent/torrent/singlefilecache.h b/libktorrent/torrent/singlefilecache.h index fc96fe7..4a787b1 100644 --- a/libktorrent/torrent/singlefilecache.h +++ b/libktorrent/torrent/singlefilecache.h @@ -49,8 +49,8 @@ namespace bt virtual void close(); virtual void open(); virtual void changeTmpDir(const TQString & ndir); - virtual KIO::Job* moveDataFiles(const TQString & ndir); - virtual void moveDataFilesCompleted(KIO::Job* job); + virtual TDEIO::Job* moveDataFiles(const TQString & ndir); + virtual void moveDataFilesCompleted(TDEIO::Job* job); virtual void changeOutputPath(const TQString& outputpath); virtual TQString getOutputPath() const {return output_file;} virtual void preallocateDiskSpace(PreallocationThread* prealloc); diff --git a/libktorrent/torrent/torrentcontrol.cpp b/libktorrent/torrent/torrentcontrol.cpp index 3cedfe9..4ac512b 100644 --- a/libktorrent/torrent/torrentcontrol.cpp +++ b/libktorrent/torrent/torrentcontrol.cpp @@ -843,7 +843,7 @@ namespace bt if (stats.output_path != nd) { - KIO::Job* j = 0; + TDEIO::Job* j = 0; if(moveFiles) { if (stats.multi_file_torrent) @@ -855,7 +855,7 @@ namespace bt move_data_files_destination_path = nd; if (j) { - connect(j,TQT_SIGNAL(result(KIO::Job*)),this,TQT_SLOT(moveDataFilesJobDone(KIO::Job*))); + connect(j,TQT_SIGNAL(result(TDEIO::Job*)),this,TQT_SLOT(moveDataFilesJobDone(TDEIO::Job*))); return true; } else @@ -884,7 +884,7 @@ namespace bt return true; } - void TorrentControl::moveDataFilesJobDone(KIO::Job* job) + void TorrentControl::moveDataFilesJobDone(TDEIO::Job* job) { if (job) cman->moveDataFilesCompleted(job); diff --git a/libktorrent/torrent/torrentcontrol.h b/libktorrent/torrent/torrentcontrol.h index 8313afe..885e9fe 100644 --- a/libktorrent/torrent/torrentcontrol.h +++ b/libktorrent/torrent/torrentcontrol.h @@ -34,7 +34,7 @@ class TQStringList; class TQString; -namespace KIO +namespace TDEIO { class Job; } @@ -308,7 +308,7 @@ namespace bt /// Update the stats of the torrent. void updateStats(); void corrupted(Uint32 chunk); - void moveDataFilesJobDone(KIO::Job* job); + void moveDataFilesJobDone(TDEIO::Job* job); private: void updateTracker(const TQString & ev,bool last_succes = true); diff --git a/libktorrent/torrent/udptracker.h b/libktorrent/torrent/udptracker.h index 240a4ff..648aa8a 100644 --- a/libktorrent/torrent/udptracker.h +++ b/libktorrent/torrent/udptracker.h @@ -87,7 +87,7 @@ namespace bt bool doRequest(); private: - KNetwork::KSocketAddress address; + KNetwork::TDESocketAddress address; Int32 transaction_id; Int64 connection_id; diff --git a/libktorrent/torrent/udptrackersocket.cpp b/libktorrent/torrent/udptrackersocket.cpp index 2baf3e4..bab6f02 100644 --- a/libktorrent/torrent/udptrackersocket.cpp +++ b/libktorrent/torrent/udptrackersocket.cpp @@ -75,7 +75,7 @@ namespace bt delete sock; } - void UDPTrackerSocket::sendConnect(Int32 tid,const KNetwork::KSocketAddress & addr) + void UDPTrackerSocket::sendConnect(Int32 tid,const KNetwork::TDESocketAddress & addr) { Int64 cid = 0x41727101980LL; Uint8 buf[16]; @@ -88,7 +88,7 @@ namespace bt transactions.insert(tid,CONNECT); } - void UDPTrackerSocket::sendAnnounce(Int32 tid,const Uint8* data,const KNetwork::KSocketAddress & addr) + void UDPTrackerSocket::sendAnnounce(Int32 tid,const Uint8* data,const KNetwork::TDESocketAddress & addr) { transactions.insert(tid,ANNOUNCE); sock->send(KDatagramPacket((char*)data,98,addr)); diff --git a/libktorrent/torrent/udptrackersocket.h b/libktorrent/torrent/udptrackersocket.h index 2f2900b..a926b8c 100644 --- a/libktorrent/torrent/udptrackersocket.h +++ b/libktorrent/torrent/udptrackersocket.h @@ -29,7 +29,7 @@ namespace KNetwork { class KDatagramSocket; - class KSocketAddress; + class TDESocketAddress; } namespace bt @@ -66,7 +66,7 @@ namespace bt * @param tid The transaction_id * @param addr The address to send to */ - void sendConnect(Int32 tid,const KNetwork::KSocketAddress & addr); + void sendConnect(Int32 tid,const KNetwork::TDESocketAddress & addr); /** * Send an announce message. As a response to this, the announceRecieved @@ -76,7 +76,7 @@ namespace bt * @param data The data to send (connect input structure, in UDP Tracker specifaction) * @param addr The address to send to */ - void sendAnnounce(Int32 tid,const Uint8* data,const KNetwork::KSocketAddress & addr); + void sendAnnounce(Int32 tid,const Uint8* data,const KNetwork::TDESocketAddress & addr); /** * If a transaction times out, this should be used to cancel it. diff --git a/libktorrent/util/autorotatelogjob.cpp b/libktorrent/util/autorotatelogjob.cpp index c703026..dd1424b 100644 --- a/libktorrent/util/autorotatelogjob.cpp +++ b/libktorrent/util/autorotatelogjob.cpp @@ -27,7 +27,7 @@ namespace bt { AutoRotateLogJob::AutoRotateLogJob(const TQString & file,Log* lg) - : KIO::Job(false),file(file),cnt(10),lg(lg) + : TDEIO::Job(false),file(file),cnt(10),lg(lg) { update(); } @@ -50,8 +50,8 @@ namespace bt TQString curr = TQString("%1-%2.gz").arg(file).arg(cnt); if (bt::Exists(prev)) // if file exists start the move job { - KIO::Job* sj = KIO::file_move(KURL::fromPathOrURL(prev),KURL::fromPathOrURL(curr),-1,true,false,false); - connect(sj,TQT_SIGNAL(result(KIO::Job*)),this,TQT_SLOT(moveJobDone(KIO::Job* ))); + TDEIO::Job* sj = TDEIO::file_move(KURL::fromPathOrURL(prev),KURL::fromPathOrURL(curr),-1,true,false,false); + connect(sj,TQT_SIGNAL(result(TDEIO::Job*)),this,TQT_SLOT(moveJobDone(TDEIO::Job* ))); return; } else @@ -64,8 +64,8 @@ namespace bt { // move current log to 1 and zip it bt::Move(file,file + "-1",true); - KIO::Job* sj = KIO::file_move(KURL::fromPathOrURL(file),KURL::fromPathOrURL(file + "-1"),-1,true,false,false); - connect(sj,TQT_SIGNAL(result(KIO::Job*)),this,TQT_SLOT(moveJobDone(KIO::Job* ))); + TDEIO::Job* sj = TDEIO::file_move(KURL::fromPathOrURL(file),KURL::fromPathOrURL(file + "-1"),-1,true,false,false); + connect(sj,TQT_SIGNAL(result(TDEIO::Job*)),this,TQT_SLOT(moveJobDone(TDEIO::Job* ))); } else { @@ -78,7 +78,7 @@ namespace bt } - void AutoRotateLogJob::moveJobDone(KIO::Job*) + void AutoRotateLogJob::moveJobDone(TDEIO::Job*) { cnt--; // decrease counter so the newt file will be moved in update update(); // don't care about result of job diff --git a/libktorrent/util/autorotatelogjob.h b/libktorrent/util/autorotatelogjob.h index 37e82a7..b1e4af1 100644 --- a/libktorrent/util/autorotatelogjob.h +++ b/libktorrent/util/autorotatelogjob.h @@ -33,7 +33,7 @@ namespace bt Job which handles the rotation of the log file. This Job must do several move jobs which must be done sequentially. */ - class AutoRotateLogJob : public KIO::Job + class AutoRotateLogJob : public TDEIO::Job { Q_OBJECT @@ -44,7 +44,7 @@ namespace bt virtual void kill(bool quietly=true); private slots: - void moveJobDone(KIO::Job*); + void moveJobDone(TDEIO::Job*); private: void update(); diff --git a/libktorrent/util/fileops.cpp b/libktorrent/util/fileops.cpp index d9ef172..5aadae3 100644 --- a/libktorrent/util/fileops.cpp +++ b/libktorrent/util/fileops.cpp @@ -102,48 +102,48 @@ namespace bt void Move(const TQString & src,const TQString & dst,bool nothrow) { // Out() << "Moving " << src << " -> " << dst << endl; - if (!KIO::NetAccess::move(KURL::fromPathOrURL(src),KURL::fromPathOrURL(dst),0)) + if (!TDEIO::NetAccess::move(KURL::fromPathOrURL(src),KURL::fromPathOrURL(dst),0)) { if (!nothrow) throw Error(i18n("Cannot move %1 to %2: %3") .arg(src).arg(dst) - .arg(KIO::NetAccess::lastErrorString())); + .arg(TDEIO::NetAccess::lastErrorString())); else Out() << TQString("Error : Cannot move %1 to %2: %3") .arg(src).arg(dst) - .arg(KIO::NetAccess::lastErrorString()) << endl; + .arg(TDEIO::NetAccess::lastErrorString()) << endl; } } void CopyFile(const TQString & src,const TQString & dst,bool nothrow) { - if (!KIO::NetAccess::file_copy(KURL::fromPathOrURL(src),KURL::fromPathOrURL(dst))) + if (!TDEIO::NetAccess::file_copy(KURL::fromPathOrURL(src),KURL::fromPathOrURL(dst))) { if (!nothrow) throw Error(i18n("Cannot copy %1 to %2: %3") .arg(src).arg(dst) - .arg(KIO::NetAccess::lastErrorString())); + .arg(TDEIO::NetAccess::lastErrorString())); else Out() << TQString("Error : Cannot copy %1 to %2: %3") .arg(src).arg(dst) - .arg(KIO::NetAccess::lastErrorString()) << endl; + .arg(TDEIO::NetAccess::lastErrorString()) << endl; } } void CopyDir(const TQString & src,const TQString & dst,bool nothrow) { - if (!KIO::NetAccess::dircopy(KURL::fromPathOrURL(src),KURL::fromPathOrURL(dst),0)) + if (!TDEIO::NetAccess::dircopy(KURL::fromPathOrURL(src),KURL::fromPathOrURL(dst),0)) { if (!nothrow) throw Error(i18n("Cannot copy %1 to %2: %3") .arg(src).arg(dst) - .arg(KIO::NetAccess::lastErrorString())); + .arg(TDEIO::NetAccess::lastErrorString())); else Out() << TQString("Error : Cannot copy %1 to %2: %3") .arg(src).arg(dst) - .arg(KIO::NetAccess::lastErrorString()) << endl; + .arg(TDEIO::NetAccess::lastErrorString()) << endl; } } diff --git a/libktorrent/util/fileops.h b/libktorrent/util/fileops.h index 067bd03..d1c3437 100644 --- a/libktorrent/util/fileops.h +++ b/libktorrent/util/fileops.h @@ -32,7 +32,7 @@ namespace bt /** * Creates a directory. Convenience function around - * KIO::NetAccess::mkdir . + * TDEIO::NetAccess::mkdir . * @param dir The url of the dir * @param nothrow wether or not we shouldn't throw an Error upon failure * @throw Error upon error diff --git a/libktorrent/util/httprequest.cpp b/libktorrent/util/httprequest.cpp index a52788e..4c869a5 100644 --- a/libktorrent/util/httprequest.cpp +++ b/libktorrent/util/httprequest.cpp @@ -103,7 +103,7 @@ namespace bt void HTTPRequest::onError(int) { - Out() << "HTTPRequest error : " << sock->KSocketBase::errorString() << endl; + Out() << "HTTPRequest error : " << sock->TDESocketBase::errorString() << endl; error(this,false); sock->close(); operationFinished(this); diff --git a/libktorrent/util/waitjob.cpp b/libktorrent/util/waitjob.cpp index 9fec771..ed00f89 100644 --- a/libktorrent/util/waitjob.cpp +++ b/libktorrent/util/waitjob.cpp @@ -25,7 +25,7 @@ namespace bt { - WaitJob::WaitJob(Uint32 millis) : KIO::Job(false) + WaitJob::WaitJob(Uint32 millis) : TDEIO::Job(false) { connect(&timer,TQT_SIGNAL(timeout()),this,TQT_SLOT(timerDone())); timer.start(millis,true); @@ -70,14 +70,14 @@ namespace bt void WaitJob::execute(WaitJob* job) { - KIO::NetAccess::synchronousRun(job,0); + TDEIO::NetAccess::synchronousRun(job,0); } void SynchronousWait(Uint32 millis) { Out() << "SynchronousWait" << endl; WaitJob* j = new WaitJob(millis); - KIO::NetAccess::synchronousRun(j,0); + TDEIO::NetAccess::synchronousRun(j,0); } } diff --git a/libktorrent/util/waitjob.h b/libktorrent/util/waitjob.h index c0754d6..232546a 100644 --- a/libktorrent/util/waitjob.h +++ b/libktorrent/util/waitjob.h @@ -35,7 +35,7 @@ namespace bt * Job to wait for a certain amount of time or until one or more ExitOperation's have * finished. */ - class WaitJob : public KIO::Job + class WaitJob : public TDEIO::Job { Q_OBJECT diff --git a/plugins/infowidget/chunkdownloadview.cpp b/plugins/infowidget/chunkdownloadview.cpp index 90595bd..a19dc78 100644 --- a/plugins/infowidget/chunkdownloadview.cpp +++ b/plugins/infowidget/chunkdownloadview.cpp @@ -143,12 +143,12 @@ namespace kt m_size_chunks->setText(TQString::number(s.chunk_size / 1024 / 1024) + "." + TQString::number(((s.chunk_size / 1024) % 1024) / 100) + " MB"); } - void ChunkDownloadView::saveLayout(KConfig* cfg,const TQString & group_name) + void ChunkDownloadView::saveLayout(TDEConfig* cfg,const TQString & group_name) { m_list_view->saveLayout(cfg,group_name); } - void ChunkDownloadView::restoreLayout(KConfig* cfg,const TQString & group_name) + void ChunkDownloadView::restoreLayout(TDEConfig* cfg,const TQString & group_name) { m_list_view->restoreLayout(cfg,group_name); } diff --git a/plugins/infowidget/chunkdownloadview.h b/plugins/infowidget/chunkdownloadview.h index e43044a..af6b109 100644 --- a/plugins/infowidget/chunkdownloadview.h +++ b/plugins/infowidget/chunkdownloadview.h @@ -54,8 +54,8 @@ namespace kt ChunkDownloadView(TQWidget *parent = 0, const char *name = 0); virtual ~ChunkDownloadView(); - void saveLayout(KConfig* cfg,const TQString & group_name); - void restoreLayout(KConfig* cfg,const TQString & group_name); + void saveLayout(TDEConfig* cfg,const TQString & group_name); + void restoreLayout(TDEConfig* cfg,const TQString & group_name); void clear(); void update(); void changeTC(kt::TorrentInterface* tc); diff --git a/plugins/ipfilter/convertdialog.cpp b/plugins/ipfilter/convertdialog.cpp index 5812453..a6cf3c7 100644 --- a/plugins/ipfilter/convertdialog.cpp +++ b/plugins/ipfilter/convertdialog.cpp @@ -94,7 +94,7 @@ namespace kt if(target.exists()) { //make backup - KIO::NetAccess::file_copy(TDEGlobal::dirs() ->saveLocation( "data", "ktorrent" ) + "level1.dat", TDEGlobal::dirs() ->saveLocation( "data", "ktorrent" ) + "level1.dat.tmp", -1, true); + TDEIO::NetAccess::file_copy(TDEGlobal::dirs() ->saveLocation( "data", "ktorrent" ) + "level1.dat", TDEGlobal::dirs() ->saveLocation( "data", "ktorrent" ) + "level1.dat.tmp", -1, true); } /* READ INPUT FILE */ @@ -245,7 +245,7 @@ namespace kt TQFile temp( TDEGlobal::dirs() ->saveLocation( "data", "ktorrent" ) + "level1.dat.tmp"); if(temp.exists()) { - KIO::NetAccess::file_copy(TDEGlobal::dirs() ->saveLocation( "data", "ktorrent" ) + "level1.dat.tmp", TDEGlobal::dirs() ->saveLocation( "data", "ktorrent" ) + "level1.dat", -1, true); + TDEIO::NetAccess::file_copy(TDEGlobal::dirs() ->saveLocation( "data", "ktorrent" ) + "level1.dat.tmp", TDEGlobal::dirs() ->saveLocation( "data", "ktorrent" ) + "level1.dat", -1, true); temp.remove(); } diff --git a/plugins/ipfilter/ipblockingprefpage.cpp b/plugins/ipfilter/ipblockingprefpage.cpp index 6c9b46f..fb1cd9d 100644 --- a/plugins/ipfilter/ipblockingprefpage.cpp +++ b/plugins/ipfilter/ipblockingprefpage.cpp @@ -107,8 +107,8 @@ namespace kt KURL url(m_url->url()); KURL dest(target); KURL temp(TDEGlobal::dirs()->saveLocation("data","ktorrent") + "level1.tmp"); - if(KIO::NetAccess::exists(temp,false, this)) - KIO::NetAccess::del(temp,this); + if(TDEIO::NetAccess::exists(temp,false, this)) + TDEIO::NetAccess::del(temp,this); bool download = true; @@ -117,26 +117,26 @@ namespace kt if((KMessageBox::questionYesNo(this, i18n("Selected file already exists, do you want to download it again?"),i18n("File Exists")) == 4)) download = false; else - KIO::NetAccess::move(target, temp); + TDEIO::NetAccess::move(target, temp); } if(download) { if(!url.isLocalFile()) { - if (KIO::NetAccess::download(url,target,NULL)) + if (TDEIO::NetAccess::download(url,target,NULL)) { //Level1 list successfully downloaded, remove temporary file - KIO::NetAccess::removeTempFile(target); - KIO::NetAccess::del(temp, this); + TDEIO::NetAccess::removeTempFile(target); + TDEIO::NetAccess::del(temp, this); } else { - TQString err = KIO::NetAccess::lastErrorString(); + TQString err = TDEIO::NetAccess::lastErrorString(); if(err != TQString()) - KMessageBox::error(0,KIO::NetAccess::lastErrorString(),i18n("Error")); + KMessageBox::error(0,TDEIO::NetAccess::lastErrorString(),i18n("Error")); else - KIO::NetAccess::move(temp, target); + TDEIO::NetAccess::move(temp, target); //we don't want to convert since download failed @@ -145,9 +145,9 @@ namespace kt } else { - if (!KIO::NetAccess::file_copy(url,dest, -1, true)) + if (!TDEIO::NetAccess::file_copy(url,dest, -1, true)) { - KMessageBox::error(0,KIO::NetAccess::lastErrorString(),i18n("Error")); + KMessageBox::error(0,TDEIO::NetAccess::lastErrorString(),i18n("Error")); return; } } @@ -158,13 +158,13 @@ namespace kt { KURL zipfile("zip:" + target + "/splist.txt"); KURL destinationfile(target + ".txt"); - KIO::NetAccess::file_copy(zipfile,destinationfile, -1, true); + TDEIO::NetAccess::file_copy(zipfile,destinationfile, -1, true); } else { KURL zipfile(target); KURL destinationfile(target + ".txt"); - KIO::NetAccess::file_copy(zipfile,destinationfile, -1, true); + TDEIO::NetAccess::file_copy(zipfile,destinationfile, -1, true); } } @@ -194,7 +194,7 @@ namespace kt if((KMessageBox::questionYesNo(this,i18n("Filter file (level1.dat) already exists, do you want to convert it again?"),i18n("File Exists")) == 4)) return; // else -// KIO::NetAccess::del(TDEGlobal::dirs()->saveLocation("data","ktorrent") + "level1.dat", NULL); +// TDEIO::NetAccess::del(TDEGlobal::dirs()->saveLocation("data","ktorrent") + "level1.dat", NULL); } ConvertDialog dlg(m_plugin); dlg.exec(); diff --git a/plugins/partfileimport/importdialog.cpp b/plugins/partfileimport/importdialog.cpp index ba43ac9..23b383f 100644 --- a/plugins/partfileimport/importdialog.cpp +++ b/plugins/partfileimport/importdialog.cpp @@ -185,7 +185,7 @@ namespace kt accept(); } - void ImportDialog::onTorrentGetReult(KIO::Job* j) + void ImportDialog::onTorrentGetReult(TDEIO::Job* j) { if (j->error()) { @@ -194,7 +194,7 @@ namespace kt } else { - KIO::StoredTransferJob* stj = (KIO::StoredTransferJob*)j; + TDEIO::StoredTransferJob* stj = (TDEIO::StoredTransferJob*)j; Torrent tor; // try to load the torrent @@ -225,8 +225,8 @@ namespace kt if (!tor_url.isLocalFile()) { // download the torrent file - KIO::StoredTransferJob* j = KIO::storedGet(tor_url); - connect(j,TQT_SIGNAL(result(KIO::Job* )),this,TQT_SLOT(onTorrentGetReult(KIO::Job*))); + TDEIO::StoredTransferJob* j = TDEIO::storedGet(tor_url); + connect(j,TQT_SIGNAL(result(TDEIO::Job* )),this,TQT_SLOT(onTorrentGetReult(TDEIO::Job*))); } else { diff --git a/plugins/partfileimport/importdialog.h b/plugins/partfileimport/importdialog.h index 4a34483..1f1a82a 100644 --- a/plugins/partfileimport/importdialog.h +++ b/plugins/partfileimport/importdialog.h @@ -33,7 +33,7 @@ namespace bt class Torrent; } -namespace KIO +namespace TDEIO { class Job; } @@ -54,7 +54,7 @@ namespace kt public slots: void onImport(); - void onTorrentGetReult(KIO::Job* j); + void onTorrentGetReult(TDEIO::Job* j); private: void writeIndex(const TQString & file,const bt::BitSet & chunks); diff --git a/plugins/rssfeed/rss/image.cpp b/plugins/rssfeed/rss/image.cpp index cb8d7c8..4dff982 100644 --- a/plugins/rssfeed/rss/image.cpp +++ b/plugins/rssfeed/rss/image.cpp @@ -32,7 +32,7 @@ struct Image::Private : public Shared unsigned int height; unsigned int width; TQBuffer *pixmapBuffer; - KIO::Job *job; + TDEIO::Job *job; }; Image::Image() : TQObject(), d(new Private) @@ -111,18 +111,18 @@ void Image::getPixmap() d->pixmapBuffer = new TQBuffer; d->pixmapBuffer->open(IO_WriteOnly); - d->job = KIO::get(d->url, false, false); - connect(d->job, TQT_SIGNAL(data(KIO::Job *, const TQByteArray &)), - this, TQT_SLOT(slotData(KIO::Job *, const TQByteArray &))); - connect(d->job, TQT_SIGNAL(result(KIO::Job *)), this, TQT_SLOT(slotResult(KIO::Job *))); + d->job = TDEIO::get(d->url, false, false); + connect(d->job, TQT_SIGNAL(data(TDEIO::Job *, const TQByteArray &)), + this, TQT_SLOT(slotData(TDEIO::Job *, const TQByteArray &))); + connect(d->job, TQT_SIGNAL(result(TDEIO::Job *)), this, TQT_SLOT(slotResult(TDEIO::Job *))); } -void Image::slotData(KIO::Job *, const TQByteArray &data) +void Image::slotData(TDEIO::Job *, const TQByteArray &data) { d->pixmapBuffer->writeBlock(data.data(), data.size()); } -void Image::slotResult(KIO::Job *job) +void Image::slotResult(TDEIO::Job *job) { TQPixmap pixmap; if (!job->error()) diff --git a/plugins/rssfeed/rss/image.h b/plugins/rssfeed/rss/image.h index bba2d6e..42074dd 100644 --- a/plugins/rssfeed/rss/image.h +++ b/plugins/rssfeed/rss/image.h @@ -17,7 +17,7 @@ class TQDomNode; -namespace KIO +namespace TDEIO { class Job; } @@ -161,8 +161,8 @@ namespace RSS void gotPixmap(const TQPixmap &pixmap); private slots: - void slotData(KIO::Job *job, const TQByteArray &data); - void slotResult(KIO::Job *job); + void slotData(TDEIO::Job *job, const TQByteArray &data); + void slotResult(TDEIO::Job *job); private: struct Private; diff --git a/plugins/rssfeed/rss/loader.cpp b/plugins/rssfeed/rss/loader.cpp index f725186..d9766d4 100644 --- a/plugins/rssfeed/rss/loader.cpp +++ b/plugins/rssfeed/rss/loader.cpp @@ -47,7 +47,7 @@ struct FileRetriever::Private TQBuffer *buffer; int lastError; - KIO::Job *job; + TDEIO::Job *job; }; FileRetriever::FileRetriever() @@ -80,16 +80,16 @@ void FileRetriever::retrieveData(const KURL &url) if (u.protocol()=="feed") u.setProtocol("http"); - d->job = KIO::get(u, !m_useCache, false); + d->job = TDEIO::get(u, !m_useCache, false); TQTimer::singleShot(1000*90, this, TQT_SLOT(slotTimeout())); - connect(d->job, TQT_SIGNAL(data(KIO::Job *, const TQByteArray &)), - TQT_SLOT(slotData(KIO::Job *, const TQByteArray &))); - connect(d->job, TQT_SIGNAL(result(KIO::Job *)), TQT_SLOT(slotResult(KIO::Job *))); - connect(d->job, TQT_SIGNAL(permanentRedirection(KIO::Job *, const KURL &, const KURL &)), - TQT_SLOT(slotPermanentRedirection(KIO::Job *, const KURL &, const KURL &))); + connect(d->job, TQT_SIGNAL(data(TDEIO::Job *, const TQByteArray &)), + TQT_SLOT(slotData(TDEIO::Job *, const TQByteArray &))); + connect(d->job, TQT_SIGNAL(result(TDEIO::Job *)), TQT_SLOT(slotResult(TDEIO::Job *))); + connect(d->job, TQT_SIGNAL(permanentRedirection(TDEIO::Job *, const KURL &, const KURL &)), + TQT_SLOT(slotPermanentRedirection(TDEIO::Job *, const KURL &, const KURL &))); } void FileRetriever::slotTimeout() @@ -99,7 +99,7 @@ void FileRetriever::slotTimeout() delete d->buffer; d->buffer = NULL; - d->lastError = KIO::ERR_SERVER_TIMEOUT; + d->lastError = TDEIO::ERR_SERVER_TIMEOUT; emit dataRetrieved(TQByteArray(), false); } @@ -109,12 +109,12 @@ int FileRetriever::errorCode() const return d->lastError; } -void FileRetriever::slotData(KIO::Job *, const TQByteArray &data) +void FileRetriever::slotData(TDEIO::Job *, const TQByteArray &data) { d->buffer->writeBlock(data.data(), data.size()); } -void FileRetriever::slotResult(KIO::Job *job) +void FileRetriever::slotResult(TDEIO::Job *job) { TQByteArray data = d->buffer->buffer(); data.detach(); @@ -126,7 +126,7 @@ void FileRetriever::slotResult(KIO::Job *job) emit dataRetrieved(data, d->lastError == 0); } -void FileRetriever::slotPermanentRedirection(KIO::Job *, const KURL &, const KURL &newUrl) +void FileRetriever::slotPermanentRedirection(TDEIO::Job *, const KURL &, const KURL &newUrl) { emit permanentRedirection(newUrl); } diff --git a/plugins/rssfeed/rss/loader.h b/plugins/rssfeed/rss/loader.h index ae2a3b9..f563782 100644 --- a/plugins/rssfeed/rss/loader.h +++ b/plugins/rssfeed/rss/loader.h @@ -17,7 +17,7 @@ class KURL; #include -namespace KIO +namespace TDEIO { class Job; } @@ -137,9 +137,9 @@ namespace RSS void slotTimeout(); private slots: - void slotData(KIO::Job *job, const TQByteArray &data); - void slotResult(KIO::Job *job); - void slotPermanentRedirection(KIO::Job *job, const KURL &fromUrl, + void slotData(TDEIO::Job *job, const TQByteArray &data); + void slotResult(TDEIO::Job *job); + void slotPermanentRedirection(TDEIO::Job *job, const KURL &fromUrl, const KURL &toUrl); private: diff --git a/plugins/rssfeed/rsslinkdownloader.cpp b/plugins/rssfeed/rsslinkdownloader.cpp index 4c11bb9..b17bec8 100644 --- a/plugins/rssfeed/rsslinkdownloader.cpp +++ b/plugins/rssfeed/rsslinkdownloader.cpp @@ -49,8 +49,8 @@ namespace kt { //first let's download the link so we can process it to check for the actual torrent curLink = curSubLink = link; - curFile = KIO::storedGet(link,false,false); - connect(curFile, TQT_SIGNAL(result(KIO::Job*)),this,TQT_SLOT(processLink( KIO::Job* ))); + curFile = TDEIO::storedGet(link,false,false); + connect(curFile, TQT_SIGNAL(result(TDEIO::Job*)),this,TQT_SLOT(processLink( TDEIO::Job* ))); } } @@ -59,7 +59,7 @@ namespace kt } - void RssLinkDownloader::processLink(KIO::Job* jobStatus) + void RssLinkDownloader::processLink(TDEIO::Job* jobStatus) { if (!jobStatus->error()) @@ -188,8 +188,8 @@ namespace kt { curSubLink = subLinks.first(); subLinks.pop_front(); - curFile = KIO::storedGet(curSubLink,false,false); - connect(curFile, TQT_SIGNAL(result(KIO::Job*)),this,TQT_SLOT(processLink( KIO::Job* ))); + curFile = TDEIO::storedGet(curSubLink,false,false); + connect(curFile, TQT_SIGNAL(result(TDEIO::Job*)),this,TQT_SLOT(processLink( TDEIO::Job* ))); } } diff --git a/plugins/rssfeed/rsslinkdownloader.h b/plugins/rssfeed/rsslinkdownloader.h index a47afd0..7fb6d85 100644 --- a/plugins/rssfeed/rsslinkdownloader.h +++ b/plugins/rssfeed/rsslinkdownloader.h @@ -59,14 +59,14 @@ namespace kt public slots: - void processLink(KIO::Job* jobStatus); + void processLink(TDEIO::Job* jobStatus); void suicide(); signals: void linkDownloaded( TQString link, int downloaded ); private: - KIO::StoredTransferJob * curFile; + TDEIO::StoredTransferJob * curFile; TQString curLink, curSubLink; TQStringList subLinks; RssFilter * curFilter; diff --git a/plugins/scanfolder/scanfolder.cpp b/plugins/scanfolder/scanfolder.cpp index fbac691..b5872f1 100644 --- a/plugins/scanfolder/scanfolder.cpp +++ b/plugins/scanfolder/scanfolder.cpp @@ -164,7 +164,7 @@ namespace kt TQFile::remove(dirname + "/." + name); // NetAccess considered harmfull !!! - KIO::file_move(url, destination); + TDEIO::file_move(url, destination); break; case defaultAction: TQFile f(dirname + "/." + name); diff --git a/plugins/search/htmlpart.cpp b/plugins/search/htmlpart.cpp index d4b39e1..ffaeb5d 100644 --- a/plugins/search/htmlpart.cpp +++ b/plugins/search/htmlpart.cpp @@ -74,12 +74,12 @@ namespace kt active_job = 0; } - KIO::TransferJob* j = KIO::get(u,false,false); - connect(j,TQT_SIGNAL(data(KIO::Job*,const TQByteArray &)), - this,TQT_SLOT(dataRecieved(KIO::Job*, const TQByteArray& ))); - connect(j,TQT_SIGNAL(result(KIO::Job*)),this,TQT_SLOT(jobDone(KIO::Job* ))); - connect(j,TQT_SIGNAL(mimetype(KIO::Job*, const TQString &)), - this,TQT_SLOT(mimetype(KIO::Job*, const TQString& ))); + TDEIO::TransferJob* j = TDEIO::get(u,false,false); + connect(j,TQT_SIGNAL(data(TDEIO::Job*,const TQByteArray &)), + this,TQT_SLOT(dataRecieved(TDEIO::Job*, const TQByteArray& ))); + connect(j,TQT_SIGNAL(result(TDEIO::Job*)),this,TQT_SLOT(jobDone(TDEIO::Job* ))); + connect(j,TQT_SIGNAL(mimetype(TDEIO::Job*, const TQString &)), + this,TQT_SLOT(mimetype(TDEIO::Job*, const TQString& ))); active_job = j; curr_data.resize(0); @@ -115,7 +115,7 @@ namespace kt openURL(url()); } - void HTMLPart::dataRecieved(KIO::Job* job,const TQByteArray & data) + void HTMLPart::dataRecieved(TDEIO::Job* job,const TQByteArray & data) { if (job != active_job) { @@ -134,7 +134,7 @@ namespace kt } } - void HTMLPart::mimetype(KIO::Job* job,const TQString & mt) + void HTMLPart::mimetype(TDEIO::Job* job,const TQString & mt) { if (job != active_job) { @@ -145,7 +145,7 @@ namespace kt mime_type = mt; } - void HTMLPart::jobDone(KIO::Job* job) + void HTMLPart::jobDone(TDEIO::Job* job) { if (job != active_job) { @@ -185,7 +185,7 @@ namespace kt else { begin(curr_url); - write(KIO::buildErrorString(job->error(),job->errorText()));/*,&curr_url));**/ + write(TDEIO::buildErrorString(job->error(),job->errorText()));/*,&curr_url));**/ end(); } active_job = 0; diff --git a/plugins/search/htmlpart.h b/plugins/search/htmlpart.h index 433a2e2..f4a3454 100644 --- a/plugins/search/htmlpart.h +++ b/plugins/search/htmlpart.h @@ -22,7 +22,7 @@ #include -namespace KIO +namespace TDEIO { class Job; } @@ -50,9 +50,9 @@ namespace kt private slots: void addToHistory(const KURL & url); - void dataRecieved(KIO::Job* job,const TQByteArray & data); - void mimetype(KIO::Job* job,const TQString & mt); - void jobDone(KIO::Job* job); + void dataRecieved(TDEIO::Job* job,const TQByteArray & data); + void mimetype(TDEIO::Job* job,const TQString & mt); + void jobDone(TDEIO::Job* job); signals: @@ -63,7 +63,7 @@ namespace kt private: KURL::List history; - KIO::Job* active_job; + TDEIO::Job* active_job; TQByteArray curr_data; TQString mime_type; KURL curr_url; diff --git a/plugins/search/searchprefpage.cpp b/plugins/search/searchprefpage.cpp index 8de3e28..d31a037 100644 --- a/plugins/search/searchprefpage.cpp +++ b/plugins/search/searchprefpage.cpp @@ -188,12 +188,12 @@ namespace kt TQString fn = TDEGlobal::dirs()->saveLocation("data","ktorrent") + "search_engines.tmp"; KURL source("http://www.ktorrent.org/downloads/search_engines"); - if (KIO::NetAccess::download(source,fn,NULL)) + if (TDEIO::NetAccess::download(source,fn,NULL)) { //list successfully downloaded, remove temporary file updateList(fn); saveSearchEngines(); - KIO::NetAccess::removeTempFile(fn); + TDEIO::NetAccess::removeTempFile(fn); } } diff --git a/plugins/search/searchwidget.cpp b/plugins/search/searchwidget.cpp index 0cf99a9..f0fefe0 100644 --- a/plugins/search/searchwidget.cpp +++ b/plugins/search/searchwidget.cpp @@ -213,7 +213,7 @@ namespace kt { KURL save_url = fdlg.selectedURL(); // start a copy job - KIO::Job* j = KIO::file_copy(url,save_url,-1,true); + TDEIO::Job* j = TDEIO::file_copy(url,save_url,-1,true); // let it deal with the errors j->setAutoErrorHandlingEnabled(true,0); } diff --git a/plugins/upnp/upnpmcastsocket.cpp b/plugins/upnp/upnpmcastsocket.cpp index 809d934..3b8be45 100644 --- a/plugins/upnp/upnpmcastsocket.cpp +++ b/plugins/upnp/upnpmcastsocket.cpp @@ -222,7 +222,7 @@ namespace kt void UPnPMCastSocket::onError(int) { - Out(SYS_PNP|LOG_IMPORTANT) << "UPnPMCastSocket Error : " << KSocketBase::errorString() << endl; + Out(SYS_PNP|LOG_IMPORTANT) << "UPnPMCastSocket Error : " << TDESocketBase::errorString() << endl; } void UPnPMCastSocket::saveRouters(const TQString & file) diff --git a/plugins/upnp/upnprouter.cpp b/plugins/upnp/upnprouter.cpp index a5d1212..d924526 100644 --- a/plugins/upnp/upnprouter.cpp +++ b/plugins/upnp/upnprouter.cpp @@ -140,7 +140,7 @@ namespace kt services.append(s); } - void UPnPRouter::downloadFinished(KIO::Job* j) + void UPnPRouter::downloadFinished(TDEIO::Job* j) { if (j->error()) { @@ -156,7 +156,7 @@ namespace kt { Out(SYS_PNP|LOG_IMPORTANT) << "Error parsing router description !" << endl; TQString dest = TDEGlobal::dirs()->saveLocation("data","ktorrent") + "upnp_failure"; - KIO::file_copy(target,dest,-1,true,false,false); + TDEIO::file_copy(target,dest,-1,true,false,false); } else { @@ -170,8 +170,8 @@ namespace kt void UPnPRouter::downloadXMLFile() { // downlaod XML description into a temporary file in /tmp - KIO::Job* job = KIO::file_copy(location,tmp_file,-1,true,false,false); - connect(job,TQT_SIGNAL(result(KIO::Job *)),this,TQT_SLOT(downloadFinished( KIO::Job* ))); + TDEIO::Job* job = TDEIO::file_copy(location,tmp_file,-1,true,false,false); + connect(job,TQT_SIGNAL(result(TDEIO::Job *)),this,TQT_SLOT(downloadFinished( TDEIO::Job* ))); } void UPnPRouter::debugPrintData() diff --git a/plugins/upnp/upnprouter.h b/plugins/upnp/upnprouter.h index 1cbac0b..081d958 100644 --- a/plugins/upnp/upnprouter.h +++ b/plugins/upnp/upnprouter.h @@ -33,7 +33,7 @@ namespace bt class WaitJob; } -namespace KIO +namespace TDEIO { class Job; } @@ -191,7 +191,7 @@ namespace kt void onReplyOK(bt::HTTPRequest* r,const TQString &); void onReplyError(bt::HTTPRequest* r,const TQString &); void onError(bt::HTTPRequest* r,bool); - void downloadFinished(KIO::Job* j); + void downloadFinished(TDEIO::Job* j); diff --git a/plugins/webinterface/php_interface.cpp b/plugins/webinterface/php_interface.cpp index 41693f3..4df085d 100644 --- a/plugins/webinterface/php_interface.cpp +++ b/plugins/webinterface/php_interface.cpp @@ -140,7 +140,7 @@ namespace kt TorrentFileInterface & file = (*i)->getTorrentFile(j); out << TQString("\"%1\" => array(\n").arg(j); out << TQString("\"name\" => \"%1\",\n").arg(file.getPath()); - out << TQString("\"size\" => \"%1\",\n").arg(KIO::convertSize(file.getSize())); + out << TQString("\"size\" => \"%1\",\n").arg(TDEIO::convertSize(file.getSize())); out << TQString("\"perc_done\" => \"%1\",\n").arg(file.getDownloadPercentage()); out << TQString("\"status\" => \"%1\"\n").arg(file.getPriority()); out << TQString(")\n");