summaryrefslogtreecommitdiffstats
path: root/src/fetch
diff options
context:
space:
mode:
Diffstat (limited to 'src/fetch')
-rw-r--r--src/fetch/execexternalfetcher.cpp18
-rw-r--r--src/fetch/execexternalfetcher.h10
-rw-r--r--src/fetch/fetcher.cpp2
-rw-r--r--src/fetch/fetchmanager.cpp12
-rw-r--r--src/fetch/gcstarpluginfetcher.cpp22
-rw-r--r--src/fetch/gcstarpluginfetcher.h10
-rw-r--r--src/fetch/z3950fetcher.cpp4
7 files changed, 39 insertions, 39 deletions
diff --git a/src/fetch/execexternalfetcher.cpp b/src/fetch/execexternalfetcher.cpp
index aecdb49..1ba084f 100644
--- a/src/fetch/execexternalfetcher.cpp
+++ b/src/fetch/execexternalfetcher.cpp
@@ -129,7 +129,7 @@ void ExecExternalFetcher::search(FetchKey key_, const TQString& value_) {
return;
}
- // should KProcess::quote() be used?
+ // should TDEProcess::quote() be used?
// %1 gets replaced by the search value, but since the arguments are going to be split
// the search value needs to be enclosed in quotation marks
// but first check to make sure the user didn't do that already
@@ -162,12 +162,12 @@ void ExecExternalFetcher::startSearch(const TQStringList& args_) {
}
#endif
- m_process = new KProcess();
- connect(m_process, TQT_SIGNAL(receivedStdout(KProcess*, char*, int)), TQT_SLOT(slotData(KProcess*, char*, int)));
- connect(m_process, TQT_SIGNAL(receivedStderr(KProcess*, char*, int)), TQT_SLOT(slotError(KProcess*, char*, int)));
- connect(m_process, TQT_SIGNAL(processExited(KProcess*)), TQT_SLOT(slotProcessExited(KProcess*)));
+ m_process = new TDEProcess();
+ connect(m_process, TQT_SIGNAL(receivedStdout(TDEProcess*, char*, int)), TQT_SLOT(slotData(TDEProcess*, char*, int)));
+ connect(m_process, TQT_SIGNAL(receivedStderr(TDEProcess*, char*, int)), TQT_SLOT(slotError(TDEProcess*, char*, int)));
+ connect(m_process, TQT_SIGNAL(processExited(TDEProcess*)), TQT_SLOT(slotProcessExited(TDEProcess*)));
*m_process << m_path << args_;
- if(!m_process->start(KProcess::NotifyOnExit, KProcess::AllOutput)) {
+ if(!m_process->start(TDEProcess::NotifyOnExit, TDEProcess::AllOutput)) {
myDebug() << "ExecExternalFetcher::startSearch() - process failed to start" << endl;
stop();
}
@@ -188,12 +188,12 @@ void ExecExternalFetcher::stop() {
emit signalDone(this);
}
-void ExecExternalFetcher::slotData(KProcess*, char* buffer_, int len_) {
+void ExecExternalFetcher::slotData(TDEProcess*, char* buffer_, int len_) {
TQDataStream stream(m_data, IO_WriteOnly | IO_Append);
stream.writeRawBytes(buffer_, len_);
}
-void ExecExternalFetcher::slotError(KProcess*, char* buffer_, int len_) {
+void ExecExternalFetcher::slotError(TDEProcess*, char* buffer_, int len_) {
GUI::CursorSaver cs(TQt::arrowCursor);
TQString msg = TQString::fromLocal8Bit(buffer_, len_);
msg.prepend(source() + TQString::fromLatin1(": "));
@@ -204,7 +204,7 @@ void ExecExternalFetcher::slotError(KProcess*, char* buffer_, int len_) {
m_errors << msg;
}
-void ExecExternalFetcher::slotProcessExited(KProcess*) {
+void ExecExternalFetcher::slotProcessExited(TDEProcess*) {
// myDebug() << "ExecExternalFetcher::slotProcessExited()" << endl;
if(!m_process->normalExit() || m_process->exitStatus()) {
myDebug() << "ExecExternalFetcher::slotProcessExited() - "<< source() << ": process did not exit successfully" << endl;
diff --git a/src/fetch/execexternalfetcher.h b/src/fetch/execexternalfetcher.h
index ec836d7..c81a27d 100644
--- a/src/fetch/execexternalfetcher.h
+++ b/src/fetch/execexternalfetcher.h
@@ -20,7 +20,7 @@
#include <tqintdict.h>
-class KProcess;
+class TDEProcess;
class KURLRequester;
class KLineEdit;
class KComboBox;
@@ -89,9 +89,9 @@ public:
static TQString defaultName();
private slots:
- void slotData(KProcess* proc, char* buffer, int len);
- void slotError(KProcess* proc, char* buffer, int len);
- void slotProcessExited(KProcess* proc);
+ void slotData(TDEProcess* proc, char* buffer, int len);
+ void slotError(TDEProcess* proc, char* buffer, int len);
+ void slotProcessExited(TDEProcess* proc);
private:
static TQStringList parseArguments(const TQString& str);
@@ -105,7 +105,7 @@ private:
TQMap<FetchKey, TQString> m_args;
bool m_canUpdate : 1;
TQString m_updateArgs;
- KProcess* m_process;
+ TDEProcess* m_process;
TQByteArray m_data;
TQMap<int, Data::EntryPtr> m_entries; // map from search result id to entry
TQStringList m_errors;
diff --git a/src/fetch/fetcher.cpp b/src/fetch/fetcher.cpp
index 712ea96..1996b96 100644
--- a/src/fetch/fetcher.cpp
+++ b/src/fetch/fetcher.cpp
@@ -22,7 +22,7 @@ using Tellico::Fetch::Fetcher;
using Tellico::Fetch::SearchResult;
Fetcher::~Fetcher() {
- KConfigGroup config(KGlobal::config(), m_configGroup);
+ KConfigGroup config(TDEGlobal::config(), m_configGroup);
saveConfigHook(config);
}
diff --git a/src/fetch/fetchmanager.cpp b/src/fetch/fetchmanager.cpp
index 4a64052..7888987 100644
--- a/src/fetch/fetchmanager.cpp
+++ b/src/fetch/fetchmanager.cpp
@@ -60,7 +60,7 @@
#include <tqdir.h>
#define LOAD_ICON(name, group, size) \
- KGlobal::iconLoader()->loadIcon(name, static_cast<KIcon::Group>(group), size_)
+ TDEGlobal::iconLoader()->loadIcon(name, static_cast<KIcon::Group>(group), size_)
using Tellico::Fetch::Manager;
Manager* Manager::s_self = 0;
@@ -93,7 +93,7 @@ void Manager::loadFetchers() {
m_fetchers.clear();
m_configMap.clear();
- KConfig* config = KGlobal::config();
+ KConfig* config = TDEGlobal::config();
if(config->hasGroup(TQString::fromLatin1("Data Sources"))) {
KConfigGroup configGroup(config, TQString::fromLatin1("Data Sources"));
int nSources = configGroup.readNumEntry("Sources Count", 0);
@@ -359,7 +359,7 @@ Tellico::Fetch::FetcherVec Manager::defaultFetchers() {
vec.append(new GoogleScholarFetcher(this));
vec.append(new DiscogsFetcher(this));
// only add IBS if user includes italian
- if(KGlobal::locale()->languagesTwoAlpha().contains(TQString::fromLatin1("it"))) {
+ if(TDEGlobal::locale()->languagesTwoAlpha().contains(TQString::fromLatin1("it"))) {
vec.append(new IBSFetcher(this));
}
return vec;
@@ -371,12 +371,12 @@ Tellico::Fetch::FetcherVec Manager::createUpdateFetchers(int collType_) {
}
FetcherVec vec;
- KConfigGroup config(KGlobal::config(), "Data Sources");
+ KConfigGroup 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*
- Fetcher::Ptr f = createFetcher(KGlobal::config(), group);
+ Fetcher::Ptr f = createFetcher(TDEGlobal::config(), group);
if(f && f->canFetch(collType_) && f->canUpdate()) {
vec.append(f);
}
@@ -440,7 +440,7 @@ Tellico::Fetch::TypePairList Manager::typeList() {
list.append(TypePair(DiscogsFetcher::defaultName(), Discogs));
// now find all the scripts distributed with tellico
- TQStringList files = KGlobal::dirs()->findAllResources("appdata", TQString::fromLatin1("data-sources/*.spec"),
+ 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);
diff --git a/src/fetch/gcstarpluginfetcher.cpp b/src/fetch/gcstarpluginfetcher.cpp
index d28d4fc..7b363ce 100644
--- a/src/fetch/gcstarpluginfetcher.cpp
+++ b/src/fetch/gcstarpluginfetcher.cpp
@@ -51,7 +51,7 @@ GCstarPluginFetcher::PluginList GCstarPluginFetcher::plugins(int collType_) {
KProcIO proc;
proc << gcstar << TQString::fromLatin1("--version");
// wait 5 seconds at most, just a sanity thing, never want to block completely
- if(proc.start(KProcess::Block) && proc.wait(5)) {
+ if(proc.start(TDEProcess::Block) && proc.wait(5)) {
TQString output;
proc.readln(output);
if(!output.isEmpty()) {
@@ -98,7 +98,7 @@ void GCstarPluginFetcher::readPluginsNew(int collType_, const TQString& gcstar_)
<< TQString::fromLatin1("--list-plugins")
<< TQString::fromLatin1("--collection") << gcstarCollection;
- if(!proc.start(KProcess::Block)) {
+ if(!proc.start(TDEProcess::Block)) {
myWarning() << "GCstarPluginFetcher::readPluginsNew() - can't start" << endl;
return;
}
@@ -228,19 +228,19 @@ void GCstarPluginFetcher::search(FetchKey key_, const TQString& value_) {
return;
}
- m_process = new KProcess();
- connect(m_process, TQT_SIGNAL(receivedStdout(KProcess*, char*, int)), TQT_SLOT(slotData(KProcess*, char*, int)));
- connect(m_process, TQT_SIGNAL(receivedStderr(KProcess*, char*, int)), TQT_SLOT(slotError(KProcess*, char*, int)));
- connect(m_process, TQT_SIGNAL(processExited(KProcess*)), TQT_SLOT(slotProcessExited(KProcess*)));
+ m_process = new TDEProcess();
+ connect(m_process, TQT_SIGNAL(receivedStdout(TDEProcess*, char*, int)), TQT_SLOT(slotData(TDEProcess*, char*, int)));
+ connect(m_process, TQT_SIGNAL(receivedStderr(TDEProcess*, char*, int)), TQT_SLOT(slotError(TDEProcess*, char*, int)));
+ connect(m_process, TQT_SIGNAL(processExited(TDEProcess*)), TQT_SLOT(slotProcessExited(TDEProcess*)));
TQStringList args;
args << gcstar << TQString::fromLatin1("-x")
<< TQString::fromLatin1("--collection") << gcstarCollection
<< TQString::fromLatin1("--export") << TQString::fromLatin1("Tellico")
<< TQString::fromLatin1("--website") << m_plugin
- << TQString::fromLatin1("--download") << KProcess::quote(value_);
+ << TQString::fromLatin1("--download") << TDEProcess::quote(value_);
myLog() << "GCstarPluginFetcher::search() - " << args.join(TQChar(' ')) << endl;
*m_process << args;
- if(!m_process->start(KProcess::NotifyOnExit, KProcess::AllOutput)) {
+ if(!m_process->start(TDEProcess::NotifyOnExit, TDEProcess::AllOutput)) {
myDebug() << "GCstarPluginFetcher::startSearch() - process failed to start" << endl;
stop();
}
@@ -261,19 +261,19 @@ void GCstarPluginFetcher::stop() {
emit signalDone(this);
}
-void GCstarPluginFetcher::slotData(KProcess*, char* buffer_, int len_) {
+void GCstarPluginFetcher::slotData(TDEProcess*, char* buffer_, int len_) {
TQDataStream stream(m_data, IO_WriteOnly | IO_Append);
stream.writeRawBytes(buffer_, len_);
}
-void GCstarPluginFetcher::slotError(KProcess*, char* buffer_, int len_) {
+void GCstarPluginFetcher::slotError(TDEProcess*, char* buffer_, int len_) {
TQString msg = TQString::fromLocal8Bit(buffer_, len_);
msg.prepend(source() + TQString::fromLatin1(": "));
myDebug() << "GCstarPluginFetcher::slotError() - " << msg << endl;
m_errors << msg;
}
-void GCstarPluginFetcher::slotProcessExited(KProcess*) {
+void GCstarPluginFetcher::slotProcessExited(TDEProcess*) {
// myDebug() << "GCstarPluginFetcher::slotProcessExited()" << endl;
if(!m_process->normalExit() || m_process->exitStatus()) {
myDebug() << "GCstarPluginFetcher::slotProcessExited() - "<< source() << ": process did not exit successfully" << endl;
diff --git a/src/fetch/gcstarpluginfetcher.h b/src/fetch/gcstarpluginfetcher.h
index 534a274..65c33c0 100644
--- a/src/fetch/gcstarpluginfetcher.h
+++ b/src/fetch/gcstarpluginfetcher.h
@@ -21,7 +21,7 @@
#include <tqintdict.h>
class TQLabel;
-class KProcess;
+class TDEProcess;
namespace Tellico {
namespace GUI {
@@ -63,9 +63,9 @@ public:
static TQString defaultName();
private slots:
- void slotData(KProcess* proc, char* buffer, int len);
- void slotError(KProcess* proc, char* buffer, int len);
- void slotProcessExited(KProcess* proc);
+ void slotData(TDEProcess* proc, char* buffer, int len);
+ void slotError(TDEProcess* proc, char* buffer, int len);
+ void slotProcessExited(TDEProcess* proc);
private:
// map Author, Name, Lang, etc...
@@ -85,7 +85,7 @@ private:
bool m_started;
int m_collType;
TQString m_plugin;
- KProcess* m_process;
+ TDEProcess* m_process;
TQByteArray m_data;
TQMap<int, Data::EntryPtr> m_entries; // map from search result id to entry
TQStringList m_errors;
diff --git a/src/fetch/z3950fetcher.cpp b/src/fetch/z3950fetcher.cpp
index 7b6ac24..9083c17 100644
--- a/src/fetch/z3950fetcher.cpp
+++ b/src/fetch/z3950fetcher.cpp
@@ -720,11 +720,11 @@ void Z3950Fetcher::ConfigWidget::slotPresetChanged() {
}
void Z3950Fetcher::ConfigWidget::loadPresets(const TQString& current_) {
- TQString lang = KGlobal::locale()->languageList().first();
+ TQString lang = TDEGlobal::locale()->languageList().first();
TQString lang2A;
{
TQString dummy;
- KGlobal::locale()->splitLocale(lang, lang2A, dummy, dummy);
+ TDEGlobal::locale()->splitLocale(lang, lang2A, dummy, dummy);
}
TQString serverFile = locate("appdata", TQString::fromLatin1("z3950-servers.cfg"));