diff options
Diffstat (limited to 'src/fetch')
40 files changed, 267 insertions, 267 deletions
diff --git a/src/fetch/amazonfetcher.cpp b/src/fetch/amazonfetcher.cpp index 1633f60..d21ee27 100644 --- a/src/fetch/amazonfetcher.cpp +++ b/src/fetch/amazonfetcher.cpp @@ -112,7 +112,7 @@ bool AmazonFetcher::canFetch(int type) const { || type == Data::Collection::Game; } -void AmazonFetcher::readConfigHook(const KConfigGroup& config_) { +void AmazonFetcher::readConfigHook(const TDEConfigGroup& config_) { TQString s = config_.readEntry("AccessKey"); if(!s.isEmpty()) { m_access = s; @@ -311,11 +311,11 @@ void AmazonFetcher::doSearch() { } // myDebug() << "AmazonFetcher::search() - url: " << u.url() << endl; - m_job = KIO::get(u, false, false); - connect(m_job, TQT_SIGNAL(data(KIO::Job*, const TQByteArray&)), - TQT_SLOT(slotData(KIO::Job*, const TQByteArray&))); - connect(m_job, TQT_SIGNAL(result(KIO::Job*)), - TQT_SLOT(slotComplete(KIO::Job*))); + m_job = TDEIO::get(u, false, false); + connect(m_job, TQT_SIGNAL(data(TDEIO::Job*, const TQByteArray&)), + TQT_SLOT(slotData(TDEIO::Job*, const TQByteArray&))); + connect(m_job, TQT_SIGNAL(result(TDEIO::Job*)), + TQT_SLOT(slotComplete(TDEIO::Job*))); } void AmazonFetcher::stop() { @@ -332,12 +332,12 @@ void AmazonFetcher::stop() { emit signalDone(this); } -void AmazonFetcher::slotData(KIO::Job*, const TQByteArray& data_) { +void AmazonFetcher::slotData(TDEIO::Job*, const TQByteArray& data_) { TQDataStream stream(m_data, IO_WriteOnly | IO_Append); stream.writeRawBytes(data_.data(), data_.size()); } -void AmazonFetcher::slotComplete(KIO::Job* job_) { +void AmazonFetcher::slotComplete(TDEIO::Job* job_) { // myDebug() << "AmazonFetcher::slotComplete()" << endl; // since the fetch is done, don't worry about holding the job pointer @@ -905,7 +905,7 @@ AmazonFetcher::ConfigWidget::ConfigWidget(TQWidget* parent_, const AmazonFetcher KAcceleratorManager::manage(optionsWidget()); } -void AmazonFetcher::ConfigWidget::saveConfig(KConfigGroup& config_) { +void AmazonFetcher::ConfigWidget::saveConfig(TDEConfigGroup& config_) { int n = m_siteCombo->currentData().toInt(); config_.writeEntry("Site", n); TQString s = m_assocEdit->text().stripWhiteSpace(); diff --git a/src/fetch/amazonfetcher.h b/src/fetch/amazonfetcher.h index a1ddc6b..03aed7d 100644 --- a/src/fetch/amazonfetcher.h +++ b/src/fetch/amazonfetcher.h @@ -28,7 +28,7 @@ class KLineEdit; class TQCheckBox; class TQLabel; -namespace KIO { +namespace TDEIO { class Job; } @@ -81,7 +81,7 @@ public: virtual Data::EntryPtr fetchEntry(uint uid); virtual Type type() const { return Amazon; } virtual bool canFetch(int type) const; - virtual void readConfigHook(const KConfigGroup& config); + virtual void readConfigHook(const TDEConfigGroup& config); virtual void updateEntry(Data::EntryPtr entry); @@ -104,8 +104,8 @@ public: static TQString defaultName(); private slots: - void slotData(KIO::Job* job, const TQByteArray& data); - void slotComplete(KIO::Job* job); + void slotData(TDEIO::Job* job, const TQByteArray& data); + void slotComplete(TDEIO::Job* job); private: void initXSLTHandler(); @@ -128,7 +128,7 @@ private: int m_total; int m_numResults; TQMap<int, Data::EntryPtr> m_entries; // they get modified after collection is created, so can't be const - TQGuardedPtr<KIO::Job> m_job; + TQGuardedPtr<TDEIO::Job> m_job; FetchKey m_key; TQString m_value; @@ -143,7 +143,7 @@ Q_OBJECT public: ConfigWidget(TQWidget* parent_, const AmazonFetcher* fetcher = 0); - virtual void saveConfig(KConfigGroup& config); + virtual void saveConfig(TDEConfigGroup& config); virtual TQString preferredName() const; private slots: diff --git a/src/fetch/animenfofetcher.cpp b/src/fetch/animenfofetcher.cpp index 43516b8..be639d6 100644 --- a/src/fetch/animenfofetcher.cpp +++ b/src/fetch/animenfofetcher.cpp @@ -55,7 +55,7 @@ bool AnimeNfoFetcher::canFetch(int type) const { return type == Data::Collection::Video; } -void AnimeNfoFetcher::readConfigHook(const KConfigGroup& config_) { +void AnimeNfoFetcher::readConfigHook(const TDEConfigGroup& config_) { Q_UNUSED(config_); } @@ -90,11 +90,11 @@ void AnimeNfoFetcher::search(FetchKey key_, const TQString& value_) { #endif // myDebug() << "AnimeNfoFetcher::search() - url: " << u.url() << endl; - m_job = KIO::get(u, false, false); - connect(m_job, TQT_SIGNAL(data(KIO::Job*, const TQByteArray&)), - TQT_SLOT(slotData(KIO::Job*, const TQByteArray&))); - connect(m_job, TQT_SIGNAL(result(KIO::Job*)), - TQT_SLOT(slotComplete(KIO::Job*))); + m_job = TDEIO::get(u, false, false); + connect(m_job, TQT_SIGNAL(data(TDEIO::Job*, const TQByteArray&)), + TQT_SLOT(slotData(TDEIO::Job*, const TQByteArray&))); + connect(m_job, TQT_SIGNAL(result(TDEIO::Job*)), + TQT_SLOT(slotComplete(TDEIO::Job*))); } void AnimeNfoFetcher::stop() { @@ -111,12 +111,12 @@ void AnimeNfoFetcher::stop() { emit signalDone(this); } -void AnimeNfoFetcher::slotData(KIO::Job*, const TQByteArray& data_) { +void AnimeNfoFetcher::slotData(TDEIO::Job*, const TQByteArray& data_) { TQDataStream stream(m_data, IO_WriteOnly | IO_Append); stream.writeRawBytes(data_.data(), data_.size()); } -void AnimeNfoFetcher::slotComplete(KIO::Job* job_) { +void AnimeNfoFetcher::slotComplete(TDEIO::Job* job_) { // myDebug() << "AnimeNfoFetcher::slotComplete()" << endl; // since the fetch is done, don't worry about holding the job pointer m_job = 0; diff --git a/src/fetch/animenfofetcher.h b/src/fetch/animenfofetcher.h index b6ba291..e8540db 100644 --- a/src/fetch/animenfofetcher.h +++ b/src/fetch/animenfofetcher.h @@ -20,7 +20,7 @@ #include <tqcstring.h> // for TQByteArray #include <tqguardedptr.h> -namespace KIO { +namespace TDEIO { class Job; } @@ -49,7 +49,7 @@ public: virtual Data::EntryPtr fetchEntry(uint uid); virtual Type type() const { return AnimeNfo; } virtual bool canFetch(int type) const; - virtual void readConfigHook(const KConfigGroup& config); + virtual void readConfigHook(const TDEConfigGroup& config); virtual void updateEntry(Data::EntryPtr entry); @@ -58,7 +58,7 @@ public: class ConfigWidget : public Fetch::ConfigWidget { public: ConfigWidget(TQWidget* parent_); - virtual void saveConfig(KConfigGroup&) {} + virtual void saveConfig(TDEConfigGroup&) {} virtual TQString preferredName() const; }; friend class ConfigWidget; @@ -66,8 +66,8 @@ public: static TQString defaultName(); private slots: - void slotData(KIO::Job* job, const TQByteArray& data); - void slotComplete(KIO::Job* job); + void slotData(TDEIO::Job* job, const TQByteArray& data); + void slotComplete(TDEIO::Job* job); private: Data::EntryPtr parseEntry(const TQString& str); @@ -76,7 +76,7 @@ private: int m_total; TQMap<int, Data::EntryPtr> m_entries; TQMap<int, KURL> m_matches; - TQGuardedPtr<KIO::Job> m_job; + TQGuardedPtr<TDEIO::Job> m_job; bool m_started; // TQStringList m_fields; diff --git a/src/fetch/arxivfetcher.cpp b/src/fetch/arxivfetcher.cpp index 377df34..ffc3e60 100644 --- a/src/fetch/arxivfetcher.cpp +++ b/src/fetch/arxivfetcher.cpp @@ -61,7 +61,7 @@ bool ArxivFetcher::canFetch(int type) const { return type == Data::Collection::Bibtex; } -void ArxivFetcher::readConfigHook(const KConfigGroup&) { +void ArxivFetcher::readConfigHook(const TDEConfigGroup&) { } void ArxivFetcher::search(FetchKey key_, const TQString& value_) { @@ -95,11 +95,11 @@ void ArxivFetcher::doSearch() { return; } - m_job = KIO::get(u, false, false); - connect(m_job, TQT_SIGNAL(data(KIO::Job*, const TQByteArray&)), - TQT_SLOT(slotData(KIO::Job*, const TQByteArray&))); - connect(m_job, TQT_SIGNAL(result(KIO::Job*)), - TQT_SLOT(slotComplete(KIO::Job*))); + m_job = TDEIO::get(u, false, false); + connect(m_job, TQT_SIGNAL(data(TDEIO::Job*, const TQByteArray&)), + TQT_SLOT(slotData(TDEIO::Job*, const TQByteArray&))); + connect(m_job, TQT_SIGNAL(result(TDEIO::Job*)), + TQT_SLOT(slotComplete(TDEIO::Job*))); } void ArxivFetcher::stop() { @@ -116,12 +116,12 @@ void ArxivFetcher::stop() { emit signalDone(this); } -void ArxivFetcher::slotData(KIO::Job*, const TQByteArray& data_) { +void ArxivFetcher::slotData(TDEIO::Job*, const TQByteArray& data_) { TQDataStream stream(m_data, IO_WriteOnly | IO_Append); stream.writeRawBytes(data_.data(), data_.size()); } -void ArxivFetcher::slotComplete(KIO::Job* job_) { +void ArxivFetcher::slotComplete(TDEIO::Job* job_) { // myDebug() << "ArxivFetcher::slotComplete()" << endl; // since the fetch is done, don't worry about holding the job pointer m_job = 0; @@ -356,7 +356,7 @@ ArxivFetcher::ConfigWidget::ConfigWidget(TQWidget* parent_, const ArxivFetcher*) l->addStretch(); } -void ArxivFetcher::ConfigWidget::saveConfig(KConfigGroup&) { +void ArxivFetcher::ConfigWidget::saveConfig(TDEConfigGroup&) { } TQString ArxivFetcher::ConfigWidget::preferredName() const { diff --git a/src/fetch/arxivfetcher.h b/src/fetch/arxivfetcher.h index 6b667d2..4ee2a80 100644 --- a/src/fetch/arxivfetcher.h +++ b/src/fetch/arxivfetcher.h @@ -50,7 +50,7 @@ public: virtual Data::EntryPtr fetchEntry(uint uid); virtual Type type() const { return Arxiv; } virtual bool canFetch(int type) const; - virtual void readConfigHook(const KConfigGroup& config); + virtual void readConfigHook(const TDEConfigGroup& config); virtual void updateEntry(Data::EntryPtr entry); virtual void updateEntrySynchronous(Data::EntryPtr entry); @@ -60,7 +60,7 @@ public: class ConfigWidget : public Fetch::ConfigWidget { public: ConfigWidget(TQWidget* parent_, const ArxivFetcher* fetcher = 0); - virtual void saveConfig(KConfigGroup& config); + virtual void saveConfig(TDEConfigGroup& config); virtual TQString preferredName() const; }; friend class ConfigWidget; @@ -68,8 +68,8 @@ public: static TQString defaultName(); private slots: - void slotData(KIO::Job* job, const TQByteArray& data); - void slotComplete(KIO::Job* job); + void slotData(TDEIO::Job* job, const TQByteArray& data); + void slotComplete(TDEIO::Job* job); private: void initXSLTHandler(); @@ -82,7 +82,7 @@ private: TQByteArray m_data; TQMap<int, Data::EntryPtr> m_entries; - TQGuardedPtr<KIO::Job> m_job; + TQGuardedPtr<TDEIO::Job> m_job; FetchKey m_key; TQString m_value; diff --git a/src/fetch/bibsonomyfetcher.cpp b/src/fetch/bibsonomyfetcher.cpp index 4ce1cd4..81b13b7 100644 --- a/src/fetch/bibsonomyfetcher.cpp +++ b/src/fetch/bibsonomyfetcher.cpp @@ -54,7 +54,7 @@ bool BibsonomyFetcher::canFetch(int type) const { return type == Data::Collection::Bibtex; } -void BibsonomyFetcher::readConfigHook(const KConfigGroup&) { +void BibsonomyFetcher::readConfigHook(const TDEConfigGroup&) { } void BibsonomyFetcher::search(FetchKey key_, const TQString& value_) { @@ -78,11 +78,11 @@ void BibsonomyFetcher::search(FetchKey key_, const TQString& value_) { return; } - m_job = KIO::get(u, false, false); - connect(m_job, TQT_SIGNAL(data(KIO::Job*, const TQByteArray&)), - TQT_SLOT(slotData(KIO::Job*, const TQByteArray&))); - connect(m_job, TQT_SIGNAL(result(KIO::Job*)), - TQT_SLOT(slotComplete(KIO::Job*))); + m_job = TDEIO::get(u, false, false); + connect(m_job, TQT_SIGNAL(data(TDEIO::Job*, const TQByteArray&)), + TQT_SLOT(slotData(TDEIO::Job*, const TQByteArray&))); + connect(m_job, TQT_SIGNAL(result(TDEIO::Job*)), + TQT_SLOT(slotComplete(TDEIO::Job*))); } void BibsonomyFetcher::stop() { @@ -99,12 +99,12 @@ void BibsonomyFetcher::stop() { emit signalDone(this); } -void BibsonomyFetcher::slotData(KIO::Job*, const TQByteArray& data_) { +void BibsonomyFetcher::slotData(TDEIO::Job*, const TQByteArray& data_) { TQDataStream stream(m_data, IO_WriteOnly | IO_Append); stream.writeRawBytes(data_.data(), data_.size()); } -void BibsonomyFetcher::slotComplete(KIO::Job* job_) { +void BibsonomyFetcher::slotComplete(TDEIO::Job* job_) { // myDebug() << "BibsonomyFetcher::slotComplete()" << endl; // since the fetch is done, don't worry about holding the job pointer m_job = 0; @@ -199,7 +199,7 @@ BibsonomyFetcher::ConfigWidget::ConfigWidget(TQWidget* parent_, const BibsonomyF l->addStretch(); } -void BibsonomyFetcher::ConfigWidget::saveConfig(KConfigGroup&) { +void BibsonomyFetcher::ConfigWidget::saveConfig(TDEConfigGroup&) { } TQString BibsonomyFetcher::ConfigWidget::preferredName() const { diff --git a/src/fetch/bibsonomyfetcher.h b/src/fetch/bibsonomyfetcher.h index 87af2db..eb85610 100644 --- a/src/fetch/bibsonomyfetcher.h +++ b/src/fetch/bibsonomyfetcher.h @@ -46,7 +46,7 @@ public: virtual Data::EntryPtr fetchEntry(uint uid); virtual Type type() const { return Bibsonomy; } virtual bool canFetch(int type) const; - virtual void readConfigHook(const KConfigGroup& config); + virtual void readConfigHook(const TDEConfigGroup& config); virtual void updateEntry(Data::EntryPtr entry); @@ -55,7 +55,7 @@ public: class ConfigWidget : public Fetch::ConfigWidget { public: ConfigWidget(TQWidget* parent_, const BibsonomyFetcher* fetcher = 0); - virtual void saveConfig(KConfigGroup& config); + virtual void saveConfig(TDEConfigGroup& config); virtual TQString preferredName() const; }; friend class ConfigWidget; @@ -63,15 +63,15 @@ public: static TQString defaultName(); private slots: - void slotData(KIO::Job* job, const TQByteArray& data); - void slotComplete(KIO::Job* job); + void slotData(TDEIO::Job* job, const TQByteArray& data); + void slotComplete(TDEIO::Job* job); private: KURL searchURL(FetchKey key, const TQString& value) const; TQByteArray m_data; TQMap<int, Data::EntryPtr> m_entries; - TQGuardedPtr<KIO::Job> m_job; + TQGuardedPtr<TDEIO::Job> m_job; FetchKey m_key; TQString m_value; diff --git a/src/fetch/citebasefetcher.cpp b/src/fetch/citebasefetcher.cpp index adc855d..5ab886d 100644 --- a/src/fetch/citebasefetcher.cpp +++ b/src/fetch/citebasefetcher.cpp @@ -55,7 +55,7 @@ bool CitebaseFetcher::canFetch(int type) const { return type == Data::Collection::Bibtex; } -void CitebaseFetcher::readConfigHook(const KConfigGroup&) { +void CitebaseFetcher::readConfigHook(const TDEConfigGroup&) { } void CitebaseFetcher::search(FetchKey key_, const TQString& value_) { @@ -79,11 +79,11 @@ void CitebaseFetcher::search(FetchKey key_, const TQString& value_) { return; } - m_job = KIO::get(u, false, false); - connect(m_job, TQT_SIGNAL(data(KIO::Job*, const TQByteArray&)), - TQT_SLOT(slotData(KIO::Job*, const TQByteArray&))); - connect(m_job, TQT_SIGNAL(result(KIO::Job*)), - TQT_SLOT(slotComplete(KIO::Job*))); + m_job = TDEIO::get(u, false, false); + connect(m_job, TQT_SIGNAL(data(TDEIO::Job*, const TQByteArray&)), + TQT_SLOT(slotData(TDEIO::Job*, const TQByteArray&))); + connect(m_job, TQT_SIGNAL(result(TDEIO::Job*)), + TQT_SLOT(slotComplete(TDEIO::Job*))); } void CitebaseFetcher::stop() { @@ -100,12 +100,12 @@ void CitebaseFetcher::stop() { emit signalDone(this); } -void CitebaseFetcher::slotData(KIO::Job*, const TQByteArray& data_) { +void CitebaseFetcher::slotData(TDEIO::Job*, const TQByteArray& data_) { TQDataStream stream(m_data, IO_WriteOnly | IO_Append); stream.writeRawBytes(data_.data(), data_.size()); } -void CitebaseFetcher::slotComplete(KIO::Job* job_) { +void CitebaseFetcher::slotComplete(TDEIO::Job* job_) { // myDebug() << "CitebaseFetcher::slotComplete()" << endl; // since the fetch is done, don't worry about holding the job pointer m_job = 0; @@ -238,7 +238,7 @@ CitebaseFetcher::ConfigWidget::ConfigWidget(TQWidget* parent_, const CitebaseFet l->addStretch(); } -void CitebaseFetcher::ConfigWidget::saveConfig(KConfigGroup&) { +void CitebaseFetcher::ConfigWidget::saveConfig(TDEConfigGroup&) { } TQString CitebaseFetcher::ConfigWidget::preferredName() const { diff --git a/src/fetch/citebasefetcher.h b/src/fetch/citebasefetcher.h index 003a43b..72325dd 100644 --- a/src/fetch/citebasefetcher.h +++ b/src/fetch/citebasefetcher.h @@ -46,7 +46,7 @@ public: virtual Data::EntryPtr fetchEntry(uint uid); virtual Type type() const { return Citebase; } virtual bool canFetch(int type) const; - virtual void readConfigHook(const KConfigGroup& config); + virtual void readConfigHook(const TDEConfigGroup& config); virtual void updateEntry(Data::EntryPtr entry); virtual void updateEntrySynchronous(Data::EntryPtr entry); @@ -56,7 +56,7 @@ public: class ConfigWidget : public Fetch::ConfigWidget { public: ConfigWidget(TQWidget* parent_, const CitebaseFetcher* fetcher = 0); - virtual void saveConfig(KConfigGroup& config); + virtual void saveConfig(TDEConfigGroup& config); virtual TQString preferredName() const; }; friend class ConfigWidget; @@ -64,15 +64,15 @@ public: static TQString defaultName(); private slots: - void slotData(KIO::Job* job, const TQByteArray& data); - void slotComplete(KIO::Job* job); + void slotData(TDEIO::Job* job, const TQByteArray& data); + void slotComplete(TDEIO::Job* job); private: KURL searchURL(FetchKey key, const TQString& value) const; TQByteArray m_data; TQMap<int, Data::EntryPtr> m_entries; - TQGuardedPtr<KIO::Job> m_job; + TQGuardedPtr<TDEIO::Job> m_job; FetchKey m_key; TQString m_value; diff --git a/src/fetch/configwidget.cpp b/src/fetch/configwidget.cpp index e268bb3..983ef9a 100644 --- a/src/fetch/configwidget.cpp +++ b/src/fetch/configwidget.cpp @@ -53,7 +53,7 @@ void ConfigWidget::addFieldsWidget(const StringMap& customFields_, const TQStrin return; } -void ConfigWidget::saveFieldsConfig(KConfigGroup& config_) const { +void ConfigWidget::saveFieldsConfig(TDEConfigGroup& config_) const { TQStringList fields; for(TQDictIterator<TQCheckBox> it(m_fields); it.current(); ++it) { if(it.current()->isChecked()) { diff --git a/src/fetch/configwidget.h b/src/fetch/configwidget.h index 55eafb0..7230cae 100644 --- a/src/fetch/configwidget.h +++ b/src/fetch/configwidget.h @@ -20,7 +20,7 @@ #include <tqdict.h> #include <tqcheckbox.h> -class KConfigGroup; +class TDEConfigGroup; class TQStringList; namespace Tellico { @@ -43,9 +43,9 @@ public: * Saves any configuration options. The config group must be * set before calling this function. * - * @param config_ The KConfig pointer + * @param config_ The TDEConfig pointer */ - virtual void saveConfig(KConfigGroup& config) = 0; + virtual void saveConfig(TDEConfigGroup& config) = 0; /** * Called when a fetcher data source is removed. Useful for any cleanup work necessary. * The ExecExternalFetcher might need to remove the script, for example. @@ -64,7 +64,7 @@ public slots: protected: TQWidget* optionsWidget() { return m_optionsWidget; } void addFieldsWidget(const StringMap& customFields, const TQStringList& fieldsToAdd); - void saveFieldsConfig(KConfigGroup& config) const; + void saveFieldsConfig(TDEConfigGroup& config) const; private: bool m_modified; diff --git a/src/fetch/crossreffetcher.cpp b/src/fetch/crossreffetcher.cpp index dd0acb2..897aca8 100644 --- a/src/fetch/crossreffetcher.cpp +++ b/src/fetch/crossreffetcher.cpp @@ -65,7 +65,7 @@ bool CrossRefFetcher::canFetch(int type) const { return type == Data::Collection::Bibtex; } -void CrossRefFetcher::readConfigHook(const KConfigGroup& config_) { +void CrossRefFetcher::readConfigHook(const TDEConfigGroup& config_) { TQString s = config_.readEntry("User"); if(!s.isEmpty()) { m_user = s; @@ -103,11 +103,11 @@ void CrossRefFetcher::search(FetchKey key_, const TQString& value_) { return; } - m_job = KIO::get(u, false, false); - connect(m_job, TQT_SIGNAL(data(KIO::Job*, const TQByteArray&)), - TQT_SLOT(slotData(KIO::Job*, const TQByteArray&))); - connect(m_job, TQT_SIGNAL(result(KIO::Job*)), - TQT_SLOT(slotComplete(KIO::Job*))); + m_job = TDEIO::get(u, false, false); + connect(m_job, TQT_SIGNAL(data(TDEIO::Job*, const TQByteArray&)), + TQT_SLOT(slotData(TDEIO::Job*, const TQByteArray&))); + connect(m_job, TQT_SIGNAL(result(TDEIO::Job*)), + TQT_SLOT(slotComplete(TDEIO::Job*))); } void CrossRefFetcher::stop() { @@ -124,12 +124,12 @@ void CrossRefFetcher::stop() { emit signalDone(this); } -void CrossRefFetcher::slotData(KIO::Job*, const TQByteArray& data_) { +void CrossRefFetcher::slotData(TDEIO::Job*, const TQByteArray& data_) { TQDataStream stream(m_data, IO_WriteOnly | IO_Append); stream.writeRawBytes(data_.data(), data_.size()); } -void CrossRefFetcher::slotComplete(KIO::Job* job_) { +void CrossRefFetcher::slotComplete(TDEIO::Job* job_) { // myDebug() << "CrossRefFetcher::slotComplete()" << endl; // since the fetch is done, don't worry about holding the job pointer m_job = 0; @@ -375,7 +375,7 @@ CrossRefFetcher::ConfigWidget::ConfigWidget(TQWidget* parent_, const CrossRefFet } } -void CrossRefFetcher::ConfigWidget::saveConfig(KConfigGroup& config_) { +void CrossRefFetcher::ConfigWidget::saveConfig(TDEConfigGroup& config_) { TQString s = m_userEdit->text(); config_.writeEntry("User", s); diff --git a/src/fetch/crossreffetcher.h b/src/fetch/crossreffetcher.h index 1bcb009..a39d69c 100644 --- a/src/fetch/crossreffetcher.h +++ b/src/fetch/crossreffetcher.h @@ -51,7 +51,7 @@ public: virtual Data::EntryPtr fetchEntry(uint uid); virtual Type type() const { return CrossRef; } virtual bool canFetch(int type) const; - virtual void readConfigHook(const KConfigGroup& config); + virtual void readConfigHook(const TDEConfigGroup& config); virtual void updateEntry(Data::EntryPtr entry); virtual void updateEntrySynchronous(Data::EntryPtr entry); @@ -61,7 +61,7 @@ public: class ConfigWidget : public Fetch::ConfigWidget { public: ConfigWidget(TQWidget* parent_, const CrossRefFetcher* fetcher = 0); - virtual void saveConfig(KConfigGroup& config); + virtual void saveConfig(TDEConfigGroup& config); virtual TQString preferredName() const; private: KLineEdit* m_userEdit; @@ -72,8 +72,8 @@ public: static TQString defaultName(); private slots: - void slotData(KIO::Job* job, const TQByteArray& data); - void slotComplete(KIO::Job* job); + void slotData(TDEIO::Job* job, const TQByteArray& data); + void slotComplete(TDEIO::Job* job); private: void initXSLTHandler(); @@ -86,7 +86,7 @@ private: TQByteArray m_data; TQMap<int, Data::EntryPtr> m_entries; - TQGuardedPtr<KIO::Job> m_job; + TQGuardedPtr<TDEIO::Job> m_job; FetchKey m_key; TQString m_value; diff --git a/src/fetch/discogsfetcher.cpp b/src/fetch/discogsfetcher.cpp index 2d3384b..f24e642 100644 --- a/src/fetch/discogsfetcher.cpp +++ b/src/fetch/discogsfetcher.cpp @@ -65,7 +65,7 @@ bool DiscogsFetcher::canFetch(int type) const { return type == Data::Collection::Album; } -void DiscogsFetcher::readConfigHook(const KConfigGroup& config_) { +void DiscogsFetcher::readConfigHook(const TDEConfigGroup& config_) { TQString k = config_.readEntry("API Key"); if(!k.isEmpty()) { m_apiKey = k; @@ -127,11 +127,11 @@ void DiscogsFetcher::doSearch() { #endif // myDebug() << "DiscogsFetcher::search() - url: " << u.url() << endl; - m_job = KIO::get(u, false, false); - connect(m_job, TQT_SIGNAL(data(KIO::Job*, const TQByteArray&)), - TQT_SLOT(slotData(KIO::Job*, const TQByteArray&))); - connect(m_job, TQT_SIGNAL(result(KIO::Job*)), - TQT_SLOT(slotComplete(KIO::Job*))); + m_job = TDEIO::get(u, false, false); + connect(m_job, TQT_SIGNAL(data(TDEIO::Job*, const TQByteArray&)), + TQT_SLOT(slotData(TDEIO::Job*, const TQByteArray&))); + connect(m_job, TQT_SIGNAL(result(TDEIO::Job*)), + TQT_SLOT(slotComplete(TDEIO::Job*))); } void DiscogsFetcher::stop() { @@ -147,12 +147,12 @@ void DiscogsFetcher::stop() { emit signalDone(this); } -void DiscogsFetcher::slotData(KIO::Job*, const TQByteArray& data_) { +void DiscogsFetcher::slotData(TDEIO::Job*, const TQByteArray& data_) { TQDataStream stream(m_data, IO_WriteOnly | IO_Append); stream.writeRawBytes(data_.data(), data_.size()); } -void DiscogsFetcher::slotComplete(KIO::Job* job_) { +void DiscogsFetcher::slotComplete(TDEIO::Job* job_) { // myDebug() << "DiscogsFetcher::slotComplete()" << endl; if(job_->error()) { job_->showErrorDialog(Kernel::self()->widget()); @@ -387,7 +387,7 @@ DiscogsFetcher::ConfigWidget::ConfigWidget(TQWidget* parent_, const DiscogsFetch } } -void DiscogsFetcher::ConfigWidget::saveConfig(KConfigGroup& config_) { +void DiscogsFetcher::ConfigWidget::saveConfig(TDEConfigGroup& config_) { TQString apiKey = m_apiKeyEdit->text().stripWhiteSpace(); if(!apiKey.isEmpty()) { config_.writeEntry("API Key", apiKey); diff --git a/src/fetch/discogsfetcher.h b/src/fetch/discogsfetcher.h index d02e8eb..e719da3 100644 --- a/src/fetch/discogsfetcher.h +++ b/src/fetch/discogsfetcher.h @@ -27,7 +27,7 @@ namespace Tellico { #include <tqcstring.h> // for TQByteArray #include <tqguardedptr.h> -namespace KIO { +namespace TDEIO { class Job; } @@ -63,7 +63,7 @@ public: virtual Data::EntryPtr fetchEntry(uint uid); virtual Type type() const { return Discogs; } virtual bool canFetch(int type) const; - virtual void readConfigHook(const KConfigGroup& config); + virtual void readConfigHook(const TDEConfigGroup& config); virtual void updateEntry(Data::EntryPtr entry); @@ -77,7 +77,7 @@ public: class ConfigWidget : public Fetch::ConfigWidget { public: ConfigWidget(TQWidget* parent_, const DiscogsFetcher* fetcher = 0); - virtual void saveConfig(KConfigGroup&); + virtual void saveConfig(TDEConfigGroup&); virtual TQString preferredName() const; private: KLineEdit *m_apiKeyEdit; @@ -88,8 +88,8 @@ public: static TQString defaultName(); private slots: - void slotData(KIO::Job* job, const TQByteArray& data); - void slotComplete(KIO::Job* job); + void slotData(TDEIO::Job* job, const TQByteArray& data); + void slotComplete(TDEIO::Job* job); private: void initXSLTHandler(); @@ -102,7 +102,7 @@ private: TQByteArray m_data; TQMap<int, Data::EntryPtr> m_entries; - TQGuardedPtr<KIO::Job> m_job; + TQGuardedPtr<TDEIO::Job> m_job; FetchKey m_key; TQString m_value; diff --git a/src/fetch/entrezfetcher.cpp b/src/fetch/entrezfetcher.cpp index 0d38009..51839ec 100644 --- a/src/fetch/entrezfetcher.cpp +++ b/src/fetch/entrezfetcher.cpp @@ -64,7 +64,7 @@ bool EntrezFetcher::canFetch(int type) const { return type == Data::Collection::Bibtex; } -void EntrezFetcher::readConfigHook(const KConfigGroup& config_) { +void EntrezFetcher::readConfigHook(const TDEConfigGroup& config_) { TQString s = config_.readEntry("Database", TQString::fromLatin1(ENTREZ_DEFAULT_DATABASE)); // default to pubmed if(!s.isEmpty()) { m_dbname = s; @@ -130,11 +130,11 @@ void EntrezFetcher::search(FetchKey key_, const TQString& value_) { m_step = Search; // myLog() << "EntrezFetcher::doSearch() - url: " << u.url() << endl; - m_job = KIO::get(u, false, false); - connect(m_job, TQT_SIGNAL(data(KIO::Job*, const TQByteArray&)), - TQT_SLOT(slotData(KIO::Job*, const TQByteArray&))); - connect(m_job, TQT_SIGNAL(result(KIO::Job*)), - TQT_SLOT(slotComplete(KIO::Job*))); + m_job = TDEIO::get(u, false, false); + connect(m_job, TQT_SIGNAL(data(TDEIO::Job*, const TQByteArray&)), + TQT_SLOT(slotData(TDEIO::Job*, const TQByteArray&))); + connect(m_job, TQT_SIGNAL(result(TDEIO::Job*)), + TQT_SLOT(slotComplete(TDEIO::Job*))); } void EntrezFetcher::continueSearch() { @@ -156,12 +156,12 @@ void EntrezFetcher::stop() { emit signalDone(this); } -void EntrezFetcher::slotData(KIO::Job*, const TQByteArray& data_) { +void EntrezFetcher::slotData(TDEIO::Job*, const TQByteArray& data_) { TQDataStream stream(m_data, IO_WriteOnly | IO_Append); stream.writeRawBytes(data_.data(), data_.size()); } -void EntrezFetcher::slotComplete(KIO::Job* job_) { +void EntrezFetcher::slotComplete(TDEIO::Job* job_) { // since the fetch is done, don't worry about holding the job pointer m_job = 0; @@ -255,11 +255,11 @@ void EntrezFetcher::doSummary() { m_step = Summary; // myLog() << "EntrezFetcher::searchResults() - url: " << u.url() << endl; - m_job = KIO::get(u, false, false); - connect(m_job, TQT_SIGNAL(data(KIO::Job*, const TQByteArray&)), - TQT_SLOT(slotData(KIO::Job*, const TQByteArray&))); - connect(m_job, TQT_SIGNAL(result(KIO::Job*)), - TQT_SLOT(slotComplete(KIO::Job*))); + m_job = TDEIO::get(u, false, false); + connect(m_job, TQT_SIGNAL(data(TDEIO::Job*, const TQByteArray&)), + TQT_SLOT(slotData(TDEIO::Job*, const TQByteArray&))); + connect(m_job, TQT_SIGNAL(result(TDEIO::Job*)), + TQT_SLOT(slotComplete(TDEIO::Job*))); } void EntrezFetcher::summaryResults() { @@ -477,7 +477,7 @@ EntrezFetcher::ConfigWidget::ConfigWidget(TQWidget* parent_, const EntrezFetcher addFieldsWidget(EntrezFetcher::customFields(), fetcher_ ? fetcher_->m_fields : TQStringList()); } -void EntrezFetcher::ConfigWidget::saveConfig(KConfigGroup& config_) { +void EntrezFetcher::ConfigWidget::saveConfig(TDEConfigGroup& config_) { saveFieldsConfig(config_); slotSetModified(false); } diff --git a/src/fetch/entrezfetcher.h b/src/fetch/entrezfetcher.h index f8bc1cc..87e13ae 100644 --- a/src/fetch/entrezfetcher.h +++ b/src/fetch/entrezfetcher.h @@ -25,7 +25,7 @@ namespace Tellico { #include <tqcstring.h> // for TQByteArray #include <tqguardedptr.h> -namespace KIO { +namespace TDEIO { class Job; } @@ -55,7 +55,7 @@ public: virtual Data::EntryPtr fetchEntry(uint uid); virtual Type type() const { return Entrez; } virtual bool canFetch(int type) const; - virtual void readConfigHook(const KConfigGroup& config); + virtual void readConfigHook(const TDEConfigGroup& config); virtual void updateEntry(Data::EntryPtr entry); virtual Fetch::ConfigWidget* configWidget(TQWidget* parent) const; @@ -64,7 +64,7 @@ public: class ConfigWidget : public Fetch::ConfigWidget { public: ConfigWidget(TQWidget* parent_, const EntrezFetcher* fetcher=0); - virtual void saveConfig(KConfigGroup& config); + virtual void saveConfig(TDEConfigGroup& config); virtual TQString preferredName() const; }; friend class ConfigWidget; @@ -72,8 +72,8 @@ public: static TQString defaultName(); private slots: - void slotData(KIO::Job* job, const TQByteArray& data); - void slotComplete(KIO::Job* job); + void slotData(TDEIO::Job* job, const TQByteArray& data); + void slotComplete(TDEIO::Job* job); private: void initXSLTHandler(); @@ -98,7 +98,7 @@ private: TQByteArray m_data; TQMap<int, Data::EntryPtr> m_entries; // map from search result id to entry TQMap<int, int> m_matches; // search result id to pubmed id - TQGuardedPtr<KIO::Job> m_job; + TQGuardedPtr<TDEIO::Job> m_job; TQString m_queryKey; TQString m_webEnv; diff --git a/src/fetch/execexternalfetcher.cpp b/src/fetch/execexternalfetcher.cpp index 1ba084f..4b45520 100644 --- a/src/fetch/execexternalfetcher.cpp +++ b/src/fetch/execexternalfetcher.cpp @@ -90,7 +90,7 @@ bool ExecExternalFetcher::canFetch(int type_) const { return m_collType == -1 ? false : m_collType == type_; } -void ExecExternalFetcher::readConfigHook(const KConfigGroup& config_) { +void ExecExternalFetcher::readConfigHook(const TDEConfigGroup& config_) { TQString s = config_.readPathEntry("ExecPath"); if(!s.isEmpty()) { m_path = s; @@ -460,7 +460,7 @@ ExecExternalFetcher::ConfigWidget::ConfigWidget(TQWidget* parent_, const ExecExt ExecExternalFetcher::ConfigWidget::~ConfigWidget() { } -void ExecExternalFetcher::ConfigWidget::readConfig(KConfig* config_) { +void ExecExternalFetcher::ConfigWidget::readConfig(TDEConfig* config_) { m_pathEdit->setURL(config_->readPathEntry("ExecPath")); TQValueList<int> argKeys = config_->readIntListEntry("ArgumentKeys"); TQStringList argValues = config_->readListEntry("Arguments"); @@ -513,7 +513,7 @@ void ExecExternalFetcher::ConfigWidget::readConfig(KConfig* config_) { m_newStuffName = config_->readEntry("NewStuffName"); } -void ExecExternalFetcher::ConfigWidget::saveConfig(KConfigGroup& config_) { +void ExecExternalFetcher::ConfigWidget::saveConfig(TDEConfigGroup& config_) { TQString s = m_pathEdit->url(); if(!s.isEmpty()) { config_.writePathEntry("ExecPath", s); diff --git a/src/fetch/execexternalfetcher.h b/src/fetch/execexternalfetcher.h index c81a27d..b303fae 100644 --- a/src/fetch/execexternalfetcher.h +++ b/src/fetch/execexternalfetcher.h @@ -58,7 +58,7 @@ public: virtual Data::EntryPtr fetchEntry(uint uid); virtual Type type() const { return ExecExternal; } virtual bool canFetch(int type) const; - virtual void readConfigHook(const KConfigGroup& config); + virtual void readConfigHook(const TDEConfigGroup& config); virtual Fetch::ConfigWidget* configWidget(TQWidget* parent) const; const TQString& execPath() const { return m_path; } @@ -68,8 +68,8 @@ public: ConfigWidget(TQWidget* parent = 0, const ExecExternalFetcher* fetcher = 0); ~ConfigWidget(); - void readConfig(KConfig* config); - virtual void saveConfig(KConfigGroup& config); + void readConfig(TDEConfig* config); + virtual void saveConfig(TDEConfigGroup& config); virtual void removed(); virtual TQString preferredName() const; diff --git a/src/fetch/fetcher.cpp b/src/fetch/fetcher.cpp index 1996b96..025d494 100644 --- a/src/fetch/fetcher.cpp +++ b/src/fetch/fetcher.cpp @@ -22,11 +22,11 @@ using Tellico::Fetch::Fetcher; using Tellico::Fetch::SearchResult; Fetcher::~Fetcher() { - KConfigGroup config(TDEGlobal::config(), m_configGroup); + TDEConfigGroup config(TDEGlobal::config(), m_configGroup); saveConfigHook(config); } -void Fetcher::readConfig(const KConfigGroup& config_, const TQString& groupName_) { +void Fetcher::readConfig(const TDEConfigGroup& config_, const TQString& groupName_) { m_configGroup = groupName_; TQString s = config_.readEntry("Name"); diff --git a/src/fetch/fetcher.h b/src/fetch/fetcher.h index c0a1b21..42d3b23 100644 --- a/src/fetch/fetcher.h +++ b/src/fetch/fetcher.h @@ -22,7 +22,7 @@ #include <tqobject.h> #include <tqstring.h> -class KConfigGroup; +class TDEConfigGroup; namespace Tellico { namespace Fetch { @@ -110,7 +110,7 @@ public: /** * Reads the config for the widget, given a config group. */ - void readConfig(const KConfigGroup& config, const TQString& groupName); + void readConfig(const TDEConfigGroup& config, const TQString& groupName); /** * Returns a widget for modifying the fetcher's config. */ @@ -127,8 +127,8 @@ protected: bool m_hasMoreResults : 1; private: - virtual void readConfigHook(const KConfigGroup&) = 0; - virtual void saveConfigHook(KConfigGroup&) {} + virtual void readConfigHook(const TDEConfigGroup&) = 0; + virtual void saveConfigHook(TDEConfigGroup&) {} MessageHandler* m_messager; TQString m_configGroup; diff --git a/src/fetch/fetchmanager.cpp b/src/fetch/fetchmanager.cpp index 7888987..5aa61cd 100644 --- a/src/fetch/fetchmanager.cpp +++ b/src/fetch/fetchmanager.cpp @@ -93,9 +93,9 @@ void Manager::loadFetchers() { m_fetchers.clear(); m_configMap.clear(); - KConfig* config = TDEGlobal::config(); + TDEConfig* config = TDEGlobal::config(); if(config->hasGroup(TQString::fromLatin1("Data Sources"))) { - KConfigGroup configGroup(config, TQString::fromLatin1("Data Sources")); + TDEConfigGroup configGroup(config, TQString::fromLatin1("Data Sources")); int nSources = configGroup.readNumEntry("Sources Count", 0); for(int i = 0; i < nSources; ++i) { TQString group = TQString::fromLatin1("Data Source %1").arg(i); @@ -235,13 +235,13 @@ bool Manager::canFetch() const { return false; } -Tellico::Fetch::Fetcher::Ptr Manager::createFetcher(KConfig* config_, const TQString& group_) { +Tellico::Fetch::Fetcher::Ptr Manager::createFetcher(TDEConfig* config_, const TQString& group_) { if(!config_->hasGroup(group_)) { myDebug() << "Manager::createFetcher() - no config group for " << group_ << endl; return 0; } - KConfigGroup config(config_, group_); + TDEConfigGroup config(config_, group_); int fetchType = config.readNumEntry("Type", Fetch::Unknown); if(fetchType == Fetch::Unknown) { @@ -371,11 +371,11 @@ Tellico::Fetch::FetcherVec Manager::createUpdateFetchers(int collType_) { } FetcherVec vec; - KConfigGroup config(TDEGlobal::config(), "Data Sources"); + TDEConfigGroup config(TDEGlobal::config(), "Data Sources"); int nSources = config.readNumEntry("Sources Count", 0); for(int i = 0; i < nSources; ++i) { TQString group = TQString::fromLatin1("Data Source %1").arg(i); - // needs the KConfig* + // needs the TDEConfig* Fetcher::Ptr f = createFetcher(TDEGlobal::config(), group); if(f && f->canFetch(collType_) && f->canUpdate()) { vec.append(f); @@ -443,7 +443,7 @@ Tellico::Fetch::TypePairList Manager::typeList() { TQStringList files = TDEGlobal::dirs()->findAllResources("appdata", TQString::fromLatin1("data-sources/*.spec"), false, true); for(TQStringList::Iterator it = files.begin(); it != files.end(); ++it) { - KConfig spec(*it, false, false); + TDEConfig spec(*it, false, false); TQString name = spec.readEntry("Name"); if(name.isEmpty()) { myDebug() << "Fetch::Manager::typeList() - no Name for " << *it << endl; @@ -499,10 +499,10 @@ Tellico::Fetch::ConfigWidget* Manager::configWidget(TQWidget* parent_, Type type from.setPath(m_scriptMap[name_]); to.setPath(tmpFile.name()); // have to overwrite since KTempFile already created it - if(!KIO::NetAccess::file_copy(from, to, -1, true /*overwrite*/)) { - myDebug() << KIO::NetAccess::lastErrorString() << endl; + if(!TDEIO::NetAccess::file_copy(from, to, -1, true /*overwrite*/)) { + myDebug() << TDEIO::NetAccess::lastErrorString() << endl; } - KConfig spec(to.path(), false, false); + TDEConfig spec(to.path(), false, false); // pass actual location of spec file if(name_ == spec.readEntry("Name") && bundledScriptHasExecPath(m_scriptMap[name_], &spec)) { static_cast<ExecExternalFetcher::ConfigWidget*>(w)->readConfig(&spec); @@ -677,7 +677,7 @@ TQString Manager::favIcon(const KURL& url_) { return KMimeType::iconForURL(url_); } -bool Manager::bundledScriptHasExecPath(const TQString& specFile_, KConfig* config_) { +bool Manager::bundledScriptHasExecPath(const TQString& specFile_, TDEConfig* config_) { // make sure ExecPath is set and executable // for the bundled scripts, either the exec name is not set, in which case it is the // name of the spec file, minus the .spec, or the exec is set, and is local to the dir diff --git a/src/fetch/fetchmanager.h b/src/fetch/fetchmanager.h index 6bfed98..4cf7909 100644 --- a/src/fetch/fetchmanager.h +++ b/src/fetch/fetchmanager.h @@ -86,12 +86,12 @@ private: static Manager* s_self; Manager(); - Fetcher::Ptr createFetcher(KConfig* config, const TQString& configGroup); + Fetcher::Ptr createFetcher(TDEConfig* config, const TQString& configGroup); FetcherVec defaultFetchers(); void updateStatus(const TQString& message); static TQString favIcon(const KURL& url); - static bool bundledScriptHasExecPath(const TQString& specFile, KConfig* config); + static bool bundledScriptHasExecPath(const TQString& specFile, TDEConfig* config); FetcherVec m_fetchers; int m_currentFetcherIndex; diff --git a/src/fetch/gcstarpluginfetcher.cpp b/src/fetch/gcstarpluginfetcher.cpp index 7b363ce..a026f97 100644 --- a/src/fetch/gcstarpluginfetcher.cpp +++ b/src/fetch/gcstarpluginfetcher.cpp @@ -198,7 +198,7 @@ bool GCstarPluginFetcher::canFetch(int type_) const { return m_collType == -1 ? false : m_collType == type_; } -void GCstarPluginFetcher::readConfigHook(const KConfigGroup& config_) { +void GCstarPluginFetcher::readConfigHook(const TDEConfigGroup& config_) { m_collType = config_.readNumEntry("CollectionType", -1); m_plugin = config_.readEntry("Plugin"); } @@ -443,7 +443,7 @@ GCstarPluginFetcher::ConfigWidget::ConfigWidget(TQWidget* parent_, const GCstarP GCstarPluginFetcher::ConfigWidget::~ConfigWidget() { } -void GCstarPluginFetcher::ConfigWidget::saveConfig(KConfigGroup& config_) { +void GCstarPluginFetcher::ConfigWidget::saveConfig(TDEConfigGroup& config_) { config_.writeEntry("CollectionType", m_collCombo->currentType()); config_.writeEntry("Plugin", m_pluginCombo->currentText()); } diff --git a/src/fetch/gcstarpluginfetcher.h b/src/fetch/gcstarpluginfetcher.h index 65c33c0..43f15ef 100644 --- a/src/fetch/gcstarpluginfetcher.h +++ b/src/fetch/gcstarpluginfetcher.h @@ -54,7 +54,7 @@ public: virtual Data::EntryPtr fetchEntry(uint uid); virtual Type type() const { return GCstarPlugin; } virtual bool canFetch(int type) const; - virtual void readConfigHook(const KConfigGroup& config); + virtual void readConfigHook(const TDEConfigGroup& config); virtual Fetch::ConfigWidget* configWidget(TQWidget* parent) const; class ConfigWidget; @@ -99,7 +99,7 @@ public: ConfigWidget(TQWidget* parent, const GCstarPluginFetcher* fetcher = 0); ~ConfigWidget(); - virtual void saveConfig(KConfigGroup& config); + virtual void saveConfig(TDEConfigGroup& config); virtual TQString preferredName() const; private slots: diff --git a/src/fetch/googlescholarfetcher.cpp b/src/fetch/googlescholarfetcher.cpp index 83730e7..567983c 100644 --- a/src/fetch/googlescholarfetcher.cpp +++ b/src/fetch/googlescholarfetcher.cpp @@ -58,7 +58,7 @@ bool GoogleScholarFetcher::canFetch(int type) const { return type == Data::Collection::Bibtex; } -void GoogleScholarFetcher::readConfigHook(const KConfigGroup& config_) { +void GoogleScholarFetcher::readConfigHook(const TDEConfigGroup& config_) { Q_UNUSED(config_); } @@ -113,11 +113,11 @@ void GoogleScholarFetcher::doSearch() { } // myDebug() << "GoogleScholarFetcher::search() - url: " << u.url() << endl; - m_job = KIO::get(u, false, false); - connect(m_job, TQT_SIGNAL(data(KIO::Job*, const TQByteArray&)), - TQT_SLOT(slotData(KIO::Job*, const TQByteArray&))); - connect(m_job, TQT_SIGNAL(result(KIO::Job*)), - TQT_SLOT(slotComplete(KIO::Job*))); + m_job = TDEIO::get(u, false, false); + connect(m_job, TQT_SIGNAL(data(TDEIO::Job*, const TQByteArray&)), + TQT_SLOT(slotData(TDEIO::Job*, const TQByteArray&))); + connect(m_job, TQT_SIGNAL(result(TDEIO::Job*)), + TQT_SLOT(slotComplete(TDEIO::Job*))); } void GoogleScholarFetcher::stop() { @@ -133,12 +133,12 @@ void GoogleScholarFetcher::stop() { emit signalDone(this); } -void GoogleScholarFetcher::slotData(KIO::Job*, const TQByteArray& data_) { +void GoogleScholarFetcher::slotData(TDEIO::Job*, const TQByteArray& data_) { TQDataStream stream(m_data, IO_WriteOnly | IO_Append); stream.writeRawBytes(data_.data(), data_.size()); } -void GoogleScholarFetcher::slotComplete(KIO::Job* job_) { +void GoogleScholarFetcher::slotComplete(TDEIO::Job* job_) { // myDebug() << "GoogleScholarFetcher::slotComplete()" << endl; // since the fetch is done, don't worry about holding the job pointer m_job = 0; diff --git a/src/fetch/googlescholarfetcher.h b/src/fetch/googlescholarfetcher.h index 70b93c3..8ef91da 100644 --- a/src/fetch/googlescholarfetcher.h +++ b/src/fetch/googlescholarfetcher.h @@ -21,7 +21,7 @@ #include <tqguardedptr.h> #include <tqregexp.h> -namespace KIO { +namespace TDEIO { class Job; } @@ -57,7 +57,7 @@ public: virtual Data::EntryPtr fetchEntry(uint uid); virtual Type type() const { return GoogleScholar; } virtual bool canFetch(int type) const; - virtual void readConfigHook(const KConfigGroup& config); + virtual void readConfigHook(const TDEConfigGroup& config); virtual void updateEntry(Data::EntryPtr entry); @@ -69,7 +69,7 @@ public: class ConfigWidget : public Fetch::ConfigWidget { public: ConfigWidget(TQWidget* parent_, const GoogleScholarFetcher* fetcher = 0); - virtual void saveConfig(KConfigGroup&) {} + virtual void saveConfig(TDEConfigGroup&) {} virtual TQString preferredName() const; }; friend class ConfigWidget; @@ -77,8 +77,8 @@ public: static TQString defaultName(); private slots: - void slotData(KIO::Job* job, const TQByteArray& data); - void slotComplete(KIO::Job* job); + void slotData(TDEIO::Job* job, const TQByteArray& data); + void slotComplete(TDEIO::Job* job); private: void doSearch(); @@ -89,7 +89,7 @@ private: TQByteArray m_data; TQMap<int, Data::EntryPtr> m_entries; - TQGuardedPtr<KIO::Job> m_job; + TQGuardedPtr<TDEIO::Job> m_job; FetchKey m_key; TQString m_value; diff --git a/src/fetch/ibsfetcher.cpp b/src/fetch/ibsfetcher.cpp index 2985c57..a6b608d 100644 --- a/src/fetch/ibsfetcher.cpp +++ b/src/fetch/ibsfetcher.cpp @@ -55,7 +55,7 @@ bool IBSFetcher::canFetch(int type) const { return type == Data::Collection::Book || type == Data::Collection::Bibtex; } -void IBSFetcher::readConfigHook(const KConfigGroup& config_) { +void IBSFetcher::readConfigHook(const TDEConfigGroup& config_) { Q_UNUSED(config_); } @@ -109,13 +109,13 @@ void IBSFetcher::search(FetchKey key_, const TQString& value_) { #endif // myDebug() << "IBSFetcher::search() - url: " << u.url() << endl; - m_job = KIO::get(u, false, false); - connect(m_job, TQT_SIGNAL(data(KIO::Job*, const TQByteArray&)), - TQT_SLOT(slotData(KIO::Job*, const TQByteArray&))); + m_job = TDEIO::get(u, false, false); + connect(m_job, TQT_SIGNAL(data(TDEIO::Job*, const TQByteArray&)), + TQT_SLOT(slotData(TDEIO::Job*, const TQByteArray&))); if(key_ == ISBN) { - connect(m_job, TQT_SIGNAL(result(KIO::Job*)), TQT_SLOT(slotCompleteISBN(KIO::Job*))); + connect(m_job, TQT_SIGNAL(result(TDEIO::Job*)), TQT_SLOT(slotCompleteISBN(TDEIO::Job*))); } else { - connect(m_job, TQT_SIGNAL(result(KIO::Job*)), TQT_SLOT(slotComplete(KIO::Job*))); + connect(m_job, TQT_SIGNAL(result(TDEIO::Job*)), TQT_SLOT(slotComplete(TDEIO::Job*))); } } @@ -133,12 +133,12 @@ void IBSFetcher::stop() { emit signalDone(this); } -void IBSFetcher::slotData(KIO::Job*, const TQByteArray& data_) { +void IBSFetcher::slotData(TDEIO::Job*, const TQByteArray& data_) { TQDataStream stream(m_data, IO_WriteOnly | IO_Append); stream.writeRawBytes(data_.data(), data_.size()); } -void IBSFetcher::slotComplete(KIO::Job* job_) { +void IBSFetcher::slotComplete(TDEIO::Job* job_) { // since the fetch is done, don't worry about holding the job pointer m_job = 0; @@ -204,7 +204,7 @@ void IBSFetcher::slotComplete(KIO::Job* job_) { stop(); } -void IBSFetcher::slotCompleteISBN(KIO::Job* job_) { +void IBSFetcher::slotCompleteISBN(TDEIO::Job* job_) { // since the fetch is done, don't worry about holding the job pointer m_job = 0; @@ -231,7 +231,7 @@ void IBSFetcher::slotCompleteISBN(KIO::Job* job_) { + '/' + entry->field(TQString::fromLatin1("publisher")); SearchResult* r = new SearchResult(this, entry->title(), desc, entry->field(TQString::fromLatin1("isbn"))); emit signalResultFound(r); - m_matches.insert(r->uid, static_cast<KIO::TransferJob*>(job_)->url().url()); + m_matches.insert(r->uid, static_cast<TDEIO::TransferJob*>(job_)->url().url()); } stop(); diff --git a/src/fetch/ibsfetcher.h b/src/fetch/ibsfetcher.h index 8f3f17e..e6f8e94 100644 --- a/src/fetch/ibsfetcher.h +++ b/src/fetch/ibsfetcher.h @@ -20,7 +20,7 @@ #include <tqcstring.h> // for TQByteArray #include <tqguardedptr.h> -namespace KIO { +namespace TDEIO { class Job; } @@ -49,7 +49,7 @@ public: virtual Data::EntryPtr fetchEntry(uint uid); virtual Type type() const { return IBS; } virtual bool canFetch(int type) const; - virtual void readConfigHook(const KConfigGroup& config); + virtual void readConfigHook(const TDEConfigGroup& config); virtual void updateEntry(Data::EntryPtr entry); @@ -58,7 +58,7 @@ public: class ConfigWidget : public Fetch::ConfigWidget { public: ConfigWidget(TQWidget* parent_); - virtual void saveConfig(KConfigGroup&) {} + virtual void saveConfig(TDEConfigGroup&) {} virtual TQString preferredName() const; }; friend class ConfigWidget; @@ -66,9 +66,9 @@ public: static TQString defaultName(); private slots: - void slotData(KIO::Job* job, const TQByteArray& data); - void slotComplete(KIO::Job* job); - void slotCompleteISBN(KIO::Job* job); + void slotData(TDEIO::Job* job, const TQByteArray& data); + void slotComplete(TDEIO::Job* job); + void slotCompleteISBN(TDEIO::Job* job); private: Data::EntryPtr parseEntry(const TQString& str); @@ -77,7 +77,7 @@ private: int m_total; TQMap<int, Data::EntryPtr> m_entries; TQMap<int, KURL> m_matches; - TQGuardedPtr<KIO::Job> m_job; + TQGuardedPtr<TDEIO::Job> m_job; bool m_started; // TQStringList m_fields; diff --git a/src/fetch/imdbfetcher.cpp b/src/fetch/imdbfetcher.cpp index 8880df9..d23881b 100644 --- a/src/fetch/imdbfetcher.cpp +++ b/src/fetch/imdbfetcher.cpp @@ -97,7 +97,7 @@ bool IMDBFetcher::canFetch(int type) const { return type == Data::Collection::Video; } -void IMDBFetcher::readConfigHook(const KConfigGroup& config_) { +void IMDBFetcher::readConfigHook(const TDEConfigGroup& config_) { TQString h = config_.readEntry("Host"); if(!h.isEmpty()) { m_host = h; @@ -164,13 +164,13 @@ void IMDBFetcher::search(FetchKey key_, const TQString& value_) { // myDebug() << "IMDBFetcher::search() url = " << m_url << endl; #endif - m_job = KIO::get(m_url, false, false); - connect(m_job, TQT_SIGNAL(data(KIO::Job*, const TQByteArray&)), - TQT_SLOT(slotData(KIO::Job*, const TQByteArray&))); - connect(m_job, TQT_SIGNAL(result(KIO::Job*)), - TQT_SLOT(slotComplete(KIO::Job*))); - connect(m_job, TQT_SIGNAL(redirection(KIO::Job *, const KURL&)), - TQT_SLOT(slotRedirection(KIO::Job*, const KURL&))); + m_job = TDEIO::get(m_url, false, false); + connect(m_job, TQT_SIGNAL(data(TDEIO::Job*, const TQByteArray&)), + TQT_SLOT(slotData(TDEIO::Job*, const TQByteArray&))); + connect(m_job, TQT_SIGNAL(result(TDEIO::Job*)), + TQT_SLOT(slotComplete(TDEIO::Job*))); + connect(m_job, TQT_SIGNAL(redirection(TDEIO::Job *, const KURL&)), + TQT_SLOT(slotRedirection(TDEIO::Job*, const KURL&))); } void IMDBFetcher::continueSearch() { @@ -217,17 +217,17 @@ void IMDBFetcher::stop() { emit signalDone(this); } -void IMDBFetcher::slotData(KIO::Job*, const TQByteArray& data_) { +void IMDBFetcher::slotData(TDEIO::Job*, const TQByteArray& data_) { TQDataStream stream(m_data, IO_WriteOnly | IO_Append); stream.writeRawBytes(data_.data(), data_.size()); } -void IMDBFetcher::slotRedirection(KIO::Job*, const KURL& toURL_) { +void IMDBFetcher::slotRedirection(TDEIO::Job*, const KURL& toURL_) { m_url = toURL_; m_redirected = true; } -void IMDBFetcher::slotComplete(KIO::Job* job_) { +void IMDBFetcher::slotComplete(TDEIO::Job* job_) { // since the fetch is done, don't worry about holding the job pointer m_job = 0; @@ -608,13 +608,13 @@ void IMDBFetcher::parseMultipleNameResults() { // redirected is true since that's how I tell if an exact match has been found m_redirected = true; m_data.truncate(0); - m_job = KIO::get(m_url, false, false); - connect(m_job, TQT_SIGNAL(data(KIO::Job*, const TQByteArray&)), - TQT_SLOT(slotData(KIO::Job*, const TQByteArray&))); - connect(m_job, TQT_SIGNAL(result(KIO::Job*)), - TQT_SLOT(slotComplete(KIO::Job*))); - connect(m_job, TQT_SIGNAL(redirection(KIO::Job *, const KURL&)), - TQT_SLOT(slotRedirection(KIO::Job*, const KURL&))); + m_job = TDEIO::get(m_url, false, false); + connect(m_job, TQT_SIGNAL(data(TDEIO::Job*, const TQByteArray&)), + TQT_SLOT(slotData(TDEIO::Job*, const TQByteArray&))); + connect(m_job, TQT_SIGNAL(result(TDEIO::Job*)), + TQT_SLOT(slotComplete(TDEIO::Job*))); + connect(m_job, TQT_SIGNAL(redirection(TDEIO::Job *, const KURL&)), + TQT_SLOT(slotRedirection(TDEIO::Job*, const KURL&))); // do not stop() here } @@ -1106,13 +1106,13 @@ void IMDBFetcher::updateEntry(Data::EntryPtr entry_) { m_matches.clear(); m_url = link; m_redirected = true; // m_redirected is used as a flag later to tell if we get a single result - m_job = KIO::get(m_url, false, false); - connect(m_job, TQT_SIGNAL(data(KIO::Job*, const TQByteArray&)), - TQT_SLOT(slotData(KIO::Job*, const TQByteArray&))); - connect(m_job, TQT_SIGNAL(result(KIO::Job*)), - TQT_SLOT(slotComplete(KIO::Job*))); - connect(m_job, TQT_SIGNAL(redirection(KIO::Job *, const KURL&)), - TQT_SLOT(slotRedirection(KIO::Job*, const KURL&))); + m_job = TDEIO::get(m_url, false, false); + connect(m_job, TQT_SIGNAL(data(TDEIO::Job*, const TQByteArray&)), + TQT_SLOT(slotData(TDEIO::Job*, const TQByteArray&))); + connect(m_job, TQT_SIGNAL(result(TDEIO::Job*)), + TQT_SLOT(slotComplete(TDEIO::Job*))); + connect(m_job, TQT_SIGNAL(redirection(TDEIO::Job *, const KURL&)), + TQT_SLOT(slotRedirection(TDEIO::Job*, const KURL&))); return; } // optimistically try searching for title and rely on Collection::sameEntry() to figure things out @@ -1179,7 +1179,7 @@ IMDBFetcher::ConfigWidget::ConfigWidget(TQWidget* parent_, const IMDBFetcher* fe } } -void IMDBFetcher::ConfigWidget::saveConfig(KConfigGroup& config_) { +void IMDBFetcher::ConfigWidget::saveConfig(TDEConfigGroup& config_) { TQString host = m_hostEdit->text().stripWhiteSpace(); if(!host.isEmpty()) { config_.writeEntry("Host", host); diff --git a/src/fetch/imdbfetcher.h b/src/fetch/imdbfetcher.h index e3f7827..75549fe 100644 --- a/src/fetch/imdbfetcher.h +++ b/src/fetch/imdbfetcher.h @@ -56,7 +56,7 @@ public: virtual Data::EntryPtr fetchEntry(uint uid); virtual Type type() const { return IMDB; } virtual bool canFetch(int type) const; - virtual void readConfigHook(const KConfigGroup& config); + virtual void readConfigHook(const TDEConfigGroup& config); virtual void updateEntry(Data::EntryPtr entry); @@ -67,7 +67,7 @@ public: class ConfigWidget : public Fetch::ConfigWidget { public: ConfigWidget(TQWidget* parent_, const IMDBFetcher* fetcher = 0); - virtual void saveConfig(KConfigGroup& config); + virtual void saveConfig(TDEConfigGroup& config); virtual TQString preferredName() const; private: @@ -80,9 +80,9 @@ public: static TQString defaultName(); private slots: - void slotData(KIO::Job* job, const TQByteArray& data); - void slotComplete(KIO::Job* job); - void slotRedirection(KIO::Job* job, const KURL& toURL); + void slotData(TDEIO::Job* job, const TQByteArray& data); + void slotComplete(TDEIO::Job* job); + void slotRedirection(TDEIO::Job* job, const KURL& toURL); private: static void initRegExps(); @@ -114,7 +114,7 @@ private: TQByteArray m_data; TQMap<int, Data::EntryPtr> m_entries; TQMap<int, KURL> m_matches; - TQGuardedPtr<KIO::Job> m_job; + TQGuardedPtr<TDEIO::Job> m_job; FetchKey m_key; TQString m_value; diff --git a/src/fetch/isbndbfetcher.cpp b/src/fetch/isbndbfetcher.cpp index cc4dcb2..d0c93c1 100644 --- a/src/fetch/isbndbfetcher.cpp +++ b/src/fetch/isbndbfetcher.cpp @@ -62,7 +62,7 @@ bool ISBNdbFetcher::canFetch(int type) const { return type == Data::Collection::Book || type == Data::Collection::ComicBook || type == Data::Collection::Bibtex; } -void ISBNdbFetcher::readConfigHook(const KConfigGroup& config_) { +void ISBNdbFetcher::readConfigHook(const TDEConfigGroup& config_) { Q_UNUSED(config_); } @@ -133,11 +133,11 @@ void ISBNdbFetcher::doSearch() { } // myDebug() << "ISBNdbFetcher::search() - url: " << u.url() << endl; - m_job = KIO::get(u, false, false); - connect(m_job, TQT_SIGNAL(data(KIO::Job*, const TQByteArray&)), - TQT_SLOT(slotData(KIO::Job*, const TQByteArray&))); - connect(m_job, TQT_SIGNAL(result(KIO::Job*)), - TQT_SLOT(slotComplete(KIO::Job*))); + m_job = TDEIO::get(u, false, false); + connect(m_job, TQT_SIGNAL(data(TDEIO::Job*, const TQByteArray&)), + TQT_SLOT(slotData(TDEIO::Job*, const TQByteArray&))); + connect(m_job, TQT_SIGNAL(result(TDEIO::Job*)), + TQT_SLOT(slotComplete(TDEIO::Job*))); } void ISBNdbFetcher::stop() { @@ -154,12 +154,12 @@ void ISBNdbFetcher::stop() { emit signalDone(this); } -void ISBNdbFetcher::slotData(KIO::Job*, const TQByteArray& data_) { +void ISBNdbFetcher::slotData(TDEIO::Job*, const TQByteArray& data_) { TQDataStream stream(m_data, IO_WriteOnly | IO_Append); stream.writeRawBytes(data_.data(), data_.size()); } -void ISBNdbFetcher::slotComplete(KIO::Job* job_) { +void ISBNdbFetcher::slotComplete(TDEIO::Job* job_) { // myDebug() << "ISBNdbFetcher::slotComplete()" << endl; // since the fetch is done, don't worry about holding the job pointer m_job = 0; diff --git a/src/fetch/isbndbfetcher.h b/src/fetch/isbndbfetcher.h index 681c65a..75e3dbf 100644 --- a/src/fetch/isbndbfetcher.h +++ b/src/fetch/isbndbfetcher.h @@ -50,7 +50,7 @@ public: virtual Data::EntryPtr fetchEntry(uint uid); virtual Type type() const { return ISBNdb; } virtual bool canFetch(int type) const; - virtual void readConfigHook(const KConfigGroup& config); + virtual void readConfigHook(const TDEConfigGroup& config); virtual void updateEntry(Data::EntryPtr entry); @@ -59,7 +59,7 @@ public: class ConfigWidget : public Fetch::ConfigWidget { public: ConfigWidget(TQWidget* parent_, const ISBNdbFetcher* fetcher = 0); - virtual void saveConfig(KConfigGroup&) {} + virtual void saveConfig(TDEConfigGroup&) {} virtual TQString preferredName() const; }; friend class ConfigWidget; @@ -67,8 +67,8 @@ public: static TQString defaultName(); private slots: - void slotData(KIO::Job* job, const TQByteArray& data); - void slotComplete(KIO::Job* job); + void slotData(TDEIO::Job* job, const TQByteArray& data); + void slotComplete(TDEIO::Job* job); private: void initXSLTHandler(); @@ -83,7 +83,7 @@ private: TQByteArray m_data; TQMap<int, Data::EntryPtr> m_entries; - TQGuardedPtr<KIO::Job> m_job; + TQGuardedPtr<TDEIO::Job> m_job; FetchKey m_key; TQString m_value; diff --git a/src/fetch/srufetcher.cpp b/src/fetch/srufetcher.cpp index 24d9ec0..505fa74 100644 --- a/src/fetch/srufetcher.cpp +++ b/src/fetch/srufetcher.cpp @@ -81,7 +81,7 @@ bool SRUFetcher::canFetch(int type) const { return type == Data::Collection::Book || type == Data::Collection::Bibtex; } -void SRUFetcher::readConfigHook(const KConfigGroup& config_) { +void SRUFetcher::readConfigHook(const TDEConfigGroup& config_) { m_host = config_.readEntry("Host"); int p = config_.readNumEntry("Port", SRU_DEFAULT_PORT); if(p > 0) { @@ -183,11 +183,11 @@ void SRUFetcher::search(FetchKey key_, const TQString& value_) { #endif // myDebug() << u.prettyURL() << endl; - m_job = KIO::get(u, false, false); - connect(m_job, TQT_SIGNAL(data(KIO::Job*, const TQByteArray&)), - TQT_SLOT(slotData(KIO::Job*, const TQByteArray&))); - connect(m_job, TQT_SIGNAL(result(KIO::Job*)), - TQT_SLOT(slotComplete(KIO::Job*))); + m_job = TDEIO::get(u, false, false); + connect(m_job, TQT_SIGNAL(data(TDEIO::Job*, const TQByteArray&)), + TQT_SLOT(slotData(TDEIO::Job*, const TQByteArray&))); + connect(m_job, TQT_SIGNAL(result(TDEIO::Job*)), + TQT_SLOT(slotComplete(TDEIO::Job*))); } void SRUFetcher::stop() { @@ -203,12 +203,12 @@ void SRUFetcher::stop() { emit signalDone(this); } -void SRUFetcher::slotData(KIO::Job*, const TQByteArray& data_) { +void SRUFetcher::slotData(TDEIO::Job*, const TQByteArray& data_) { TQDataStream stream(m_data, IO_WriteOnly | IO_Append); stream.writeRawBytes(data_.data(), data_.size()); } -void SRUFetcher::slotComplete(KIO::Job* job_) { +void SRUFetcher::slotComplete(TDEIO::Job* job_) { // since the fetch is done, don't worry about holding the job pointer m_job = 0; @@ -495,7 +495,7 @@ SRUConfigWidget::SRUConfigWidget(TQWidget* parent_, const SRUFetcher* fetcher_ / KAcceleratorManager::manage(optionsWidget()); } -void SRUConfigWidget::saveConfig(KConfigGroup& config_) { +void SRUConfigWidget::saveConfig(TDEConfigGroup& config_) { TQString s = m_hostEdit->text().stripWhiteSpace(); if(!s.isEmpty()) { config_.writeEntry("Host", s); diff --git a/src/fetch/srufetcher.h b/src/fetch/srufetcher.h index f635071..1b6c2b4 100644 --- a/src/fetch/srufetcher.h +++ b/src/fetch/srufetcher.h @@ -24,7 +24,7 @@ namespace Tellico { class KIntSpinBox; class KComboBox; -namespace KIO { +namespace TDEIO { class Job; } @@ -73,7 +73,7 @@ public: virtual Data::EntryPtr fetchEntry(uint uid); virtual Type type() const { return SRU; } virtual bool canFetch(int type) const; - virtual void readConfigHook(const KConfigGroup& config); + virtual void readConfigHook(const TDEConfigGroup& config); virtual void updateEntry(Data::EntryPtr entry); @@ -86,8 +86,8 @@ public: static Fetcher::Ptr libraryOfCongress(TQObject* parent); private slots: - void slotData(KIO::Job* job, const TQByteArray& data); - void slotComplete(KIO::Job* job); + void slotData(TDEIO::Job* job, const TQByteArray& data); + void slotComplete(TDEIO::Job* job); private: bool initMARCXMLHandler(); @@ -100,7 +100,7 @@ private: TQByteArray m_data; TQMap<int, Data::EntryPtr> m_entries; - TQGuardedPtr<KIO::Job> m_job; + TQGuardedPtr<TDEIO::Job> m_job; XSLTHandler* m_MARCXMLHandler; XSLTHandler* m_MODSHandler; bool m_started; @@ -115,7 +115,7 @@ friend class SRUFetcher; public: SRUConfigWidget(TQWidget* parent_, const SRUFetcher* fetcher = 0); - virtual void saveConfig(KConfigGroup& config); + virtual void saveConfig(TDEConfigGroup& config); virtual TQString preferredName() const; private slots: diff --git a/src/fetch/yahoofetcher.cpp b/src/fetch/yahoofetcher.cpp index 2746f90..fe6d407 100644 --- a/src/fetch/yahoofetcher.cpp +++ b/src/fetch/yahoofetcher.cpp @@ -62,7 +62,7 @@ bool YahooFetcher::canFetch(int type) const { return type == Data::Collection::Album; } -void YahooFetcher::readConfigHook(const KConfigGroup& config_) { +void YahooFetcher::readConfigHook(const TDEConfigGroup& config_) { Q_UNUSED(config_); } @@ -119,11 +119,11 @@ void YahooFetcher::doSearch() { } // myDebug() << "YahooFetcher::search() - url: " << u.url() << endl; - m_job = KIO::get(u, false, false); - connect(m_job, TQT_SIGNAL(data(KIO::Job*, const TQByteArray&)), - TQT_SLOT(slotData(KIO::Job*, const TQByteArray&))); - connect(m_job, TQT_SIGNAL(result(KIO::Job*)), - TQT_SLOT(slotComplete(KIO::Job*))); + m_job = TDEIO::get(u, false, false); + connect(m_job, TQT_SIGNAL(data(TDEIO::Job*, const TQByteArray&)), + TQT_SLOT(slotData(TDEIO::Job*, const TQByteArray&))); + connect(m_job, TQT_SIGNAL(result(TDEIO::Job*)), + TQT_SLOT(slotComplete(TDEIO::Job*))); } void YahooFetcher::stop() { @@ -139,12 +139,12 @@ void YahooFetcher::stop() { emit signalDone(this); } -void YahooFetcher::slotData(KIO::Job*, const TQByteArray& data_) { +void YahooFetcher::slotData(TDEIO::Job*, const TQByteArray& data_) { TQDataStream stream(m_data, IO_WriteOnly | IO_Append); stream.writeRawBytes(data_.data(), data_.size()); } -void YahooFetcher::slotComplete(KIO::Job* job_) { +void YahooFetcher::slotComplete(TDEIO::Job* job_) { // myDebug() << "YahooFetcher::slotComplete()" << endl; // since the fetch is done, don't worry about holding the job pointer m_job = 0; diff --git a/src/fetch/yahoofetcher.h b/src/fetch/yahoofetcher.h index 1620520..efaf95f 100644 --- a/src/fetch/yahoofetcher.h +++ b/src/fetch/yahoofetcher.h @@ -25,7 +25,7 @@ namespace Tellico { #include <tqcstring.h> // for TQByteArray #include <tqguardedptr.h> -namespace KIO { +namespace TDEIO { class Job; } @@ -58,7 +58,7 @@ public: virtual Data::EntryPtr fetchEntry(uint uid); virtual Type type() const { return Yahoo; } virtual bool canFetch(int type) const; - virtual void readConfigHook(const KConfigGroup& config); + virtual void readConfigHook(const TDEConfigGroup& config); virtual void updateEntry(Data::EntryPtr entry); @@ -70,7 +70,7 @@ public: class ConfigWidget : public Fetch::ConfigWidget { public: ConfigWidget(TQWidget* parent_, const YahooFetcher* fetcher = 0); - virtual void saveConfig(KConfigGroup&) {} + virtual void saveConfig(TDEConfigGroup&) {} virtual TQString preferredName() const; }; friend class ConfigWidget; @@ -78,8 +78,8 @@ public: static TQString defaultName(); private slots: - void slotData(KIO::Job* job, const TQByteArray& data); - void slotComplete(KIO::Job* job); + void slotData(TDEIO::Job* job, const TQByteArray& data); + void slotComplete(TDEIO::Job* job); private: void initXSLTHandler(); @@ -94,7 +94,7 @@ private: TQByteArray m_data; TQMap<int, Data::EntryPtr> m_entries; // they get modified after collection is created, so can't be const - TQGuardedPtr<KIO::Job> m_job; + TQGuardedPtr<TDEIO::Job> m_job; FetchKey m_key; TQString m_value; diff --git a/src/fetch/z3950fetcher.cpp b/src/fetch/z3950fetcher.cpp index 9083c17..3be46fc 100644 --- a/src/fetch/z3950fetcher.cpp +++ b/src/fetch/z3950fetcher.cpp @@ -88,7 +88,7 @@ bool Z3950Fetcher::canFetch(int type) const { return type == Data::Collection::Book || type == Data::Collection::Bibtex; } -void Z3950Fetcher::readConfigHook(const KConfigGroup& config_) { +void Z3950Fetcher::readConfigHook(const TDEConfigGroup& config_) { TQString preset = config_.readEntry("Preset"); if(preset.isEmpty()) { m_host = config_.readEntry("Host"); @@ -105,7 +105,7 @@ void Z3950Fetcher::readConfigHook(const KConfigGroup& config_) { m_preset = preset; TQString serverFile = locate("appdata", TQString::fromLatin1("z3950-servers.cfg")); if(!serverFile.isEmpty()) { - KConfig cfg(serverFile, true /* read-only */, false /* read KDE */); + TDEConfig cfg(serverFile, true /* read-only */, false /* read KDE */); const TQStringList servers = cfg.groupList(); for(TQStringList::ConstIterator server = servers.begin(); server != servers.end(); ++server) { cfg.setGroup(*server); @@ -128,7 +128,7 @@ void Z3950Fetcher::readConfigHook(const KConfigGroup& config_) { m_fields = config_.readListEntry("Custom Fields"); } -void Z3950Fetcher::saveConfigHook(KConfigGroup& config_) { +void Z3950Fetcher::saveConfigHook(TDEConfigGroup& config_) { config_.writeEntry("Syntax", m_syntax); config_.sync(); } @@ -644,7 +644,7 @@ Z3950Fetcher::ConfigWidget::ConfigWidget(TQWidget* parent_, const Z3950Fetcher* Z3950Fetcher::ConfigWidget::~ConfigWidget() { } -void Z3950Fetcher::ConfigWidget::saveConfig(KConfigGroup& config_) { +void Z3950Fetcher::ConfigWidget::saveConfig(TDEConfigGroup& config_) { if(m_usePreset->isChecked()) { TQString presetID = m_serverCombo->currentData().toString(); config_.writeEntry("Preset", presetID); @@ -735,7 +735,7 @@ void Z3950Fetcher::ConfigWidget::loadPresets(const TQString& current_) { int idx = -1; - KConfig cfg(serverFile, true /* read-only */, false /* read KDE */); + TDEConfig cfg(serverFile, true /* read-only */, false /* read KDE */); const TQStringList servers = cfg.groupList(); // I want the list of servers sorted by name TQMap<TQString, TQString> serverNameMap; diff --git a/src/fetch/z3950fetcher.h b/src/fetch/z3950fetcher.h index 0618b65..b5bb688 100644 --- a/src/fetch/z3950fetcher.h +++ b/src/fetch/z3950fetcher.h @@ -67,8 +67,8 @@ public: virtual Data::EntryPtr fetchEntry(uint uid); virtual Type type() const { return Z3950; } virtual bool canFetch(int type) const; - virtual void readConfigHook(const KConfigGroup& config); - virtual void saveConfigHook(KConfigGroup& config); + virtual void readConfigHook(const TDEConfigGroup& config); + virtual void saveConfigHook(TDEConfigGroup& config); virtual void updateEntry(Data::EntryPtr entry); const TQString& host() const { return m_host; } @@ -127,7 +127,7 @@ Q_OBJECT public: ConfigWidget(TQWidget* parent, const Z3950Fetcher* fetcher = 0); virtual ~ConfigWidget(); - virtual void saveConfig(KConfigGroup& config_); + virtual void saveConfig(TDEConfigGroup& config_); virtual TQString preferredName() const; private slots: |