summaryrefslogtreecommitdiffstats
path: root/knewstuff
diff options
context:
space:
mode:
Diffstat (limited to 'knewstuff')
-rw-r--r--knewstuff/CMakeLists.txt16
-rw-r--r--knewstuff/Makefile.am14
-rw-r--r--knewstuff/downloaddialog.cpp120
-rw-r--r--knewstuff/downloaddialog.h20
-rw-r--r--knewstuff/engine.cpp54
-rw-r--r--knewstuff/engine.h18
-rw-r--r--knewstuff/entry.cpp12
-rw-r--r--knewstuff/ghns.cpp14
-rw-r--r--knewstuff/ghns.h2
-rw-r--r--knewstuff/knewstuff.cpp16
-rw-r--r--knewstuff/knewstuff.h8
-rw-r--r--knewstuff/knewstuffbutton.cpp2
-rw-r--r--knewstuff/knewstuffbutton.h2
-rw-r--r--knewstuff/knewstuffgeneric.cpp14
-rw-r--r--knewstuff/knewstuffgeneric.h4
-rw-r--r--knewstuff/knewstuffsecure.cpp20
-rw-r--r--knewstuff/provider.cpp26
-rw-r--r--knewstuff/provider.h8
-rw-r--r--knewstuff/providerdialog.cpp14
-rw-r--r--knewstuff/providerdialog.h4
-rw-r--r--knewstuff/security.cpp22
-rw-r--r--knewstuff/security.h4
-rw-r--r--knewstuff/tdehotnewstuff.cpp (renamed from knewstuff/khotnewstuff.cpp)24
-rw-r--r--knewstuff/tdehotnewstuffrc (renamed from knewstuff/khotnewstuffrc)0
-rw-r--r--knewstuff/testnewstuff.cpp18
-rw-r--r--knewstuff/testnewstuff.h2
-rw-r--r--knewstuff/uploaddialog.cpp16
27 files changed, 237 insertions, 237 deletions
diff --git a/knewstuff/CMakeLists.txt b/knewstuff/CMakeLists.txt
index 50350f29f..4493ee385 100644
--- a/knewstuff/CMakeLists.txt
+++ b/knewstuff/CMakeLists.txt
@@ -16,9 +16,9 @@ include_directories(
${CMAKE_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/tdecore
${CMAKE_SOURCE_DIR}/tdeui
- ${CMAKE_SOURCE_DIR}/kio
- ${CMAKE_SOURCE_DIR}/kio/kio
- ${CMAKE_SOURCE_DIR}/kio/kfile
+ ${CMAKE_SOURCE_DIR}/tdeio
+ ${CMAKE_SOURCE_DIR}/tdeio/tdeio
+ ${CMAKE_SOURCE_DIR}/tdeio/tdefile
)
link_directories(
@@ -38,7 +38,7 @@ install( FILES
##### other data ################################
install( FILES types DESTINATION ${DATA_INSTALL_DIR}/knewstuff )
-install( FILES khotnewstuffrc DESTINATION ${CONFIG_INSTALL_DIR} )
+install( FILES tdehotnewstuffrc DESTINATION ${CONFIG_INSTALL_DIR} )
tde_install_icons( )
@@ -55,17 +55,17 @@ set( ${target}_SRCS
tde_add_library( ${target} SHARED AUTOMOC
SOURCES ${${target}_SRCS}
VERSION 1.0.0
- LINK kio-shared
+ LINK tdeio-shared
DESTINATION ${LIB_INSTALL_DIR}
)
-##### khotnewstuff ##############################
+##### tdehotnewstuff ##############################
-set( target khotnewstuff )
+set( target tdehotnewstuff )
set( ${target}_SRCS
- khotnewstuff.cpp
+ tdehotnewstuff.cpp
)
tde_add_executable( ${target} AUTOMOC
diff --git a/knewstuff/Makefile.am b/knewstuff/Makefile.am
index 50272b343..c15716c8e 100644
--- a/knewstuff/Makefile.am
+++ b/knewstuff/Makefile.am
@@ -10,26 +10,26 @@ libknewstuff_la_SOURCES = engine.cpp entry.cpp downloaddialog.cpp \
uploaddialog.cpp providerdialog.cpp provider.cpp knewstuff.cpp \
knewstuffgeneric.cpp knewstuffbutton.cpp knewstuffsecure.cpp security.cpp
-bin_PROGRAMS = khotnewstuff
+bin_PROGRAMS = tdehotnewstuff
-khotnewstuff_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -lktexteditor
-khotnewstuff_LDADD = libknewstuff.la
-khotnewstuff_SOURCES = khotnewstuff.cpp
+tdehotnewstuff_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor
+tdehotnewstuff_LDADD = libknewstuff.la
+tdehotnewstuff_SOURCES = tdehotnewstuff.cpp
EXTRA_PROGRAMS = testnewstuff ghns
-testnewstuff_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -lktexteditor
+testnewstuff_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor
testnewstuff_LDADD = libknewstuff.la
testnewstuff_SOURCES = testnewstuff.cpp
-ghns_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -lktexteditor
+ghns_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor
ghns_LDADD = libknewstuff.la
ghns_SOURCES = ghns.cpp
knewstuffdir = $(kde_datadir)/knewstuff
knewstuff_DATA = types
-kde_conf_DATA = khotnewstuffrc
+kde_conf_DATA = tdehotnewstuffrc
knsdir = $(includedir)/knewstuff
kns_HEADERS = downloaddialog.h engine.h entry.h knewstuffgeneric.h knewstuff.h providerdialog.h provider.h uploaddialog.h knewstuffbutton.h knewstuffsecure.h
diff --git a/knewstuff/downloaddialog.cpp b/knewstuff/downloaddialog.cpp
index e8e2bfb3f..8c31712cb 100644
--- a/knewstuff/downloaddialog.cpp
+++ b/knewstuff/downloaddialog.cpp
@@ -21,15 +21,15 @@
#include "downloaddialog.h"
#include "downloaddialog.moc"
-#include <klocale.h>
-#include <klistview.h>
+#include <tdelocale.h>
+#include <tdelistview.h>
#include <kdebug.h>
-#include <kio/job.h>
-#include <kio/netaccess.h>
-#include <kmessagebox.h>
+#include <tdeio/job.h>
+#include <tdeio/netaccess.h>
+#include <tdemessagebox.h>
#include <kurl.h>
-#include <kconfig.h>
-#include <kapplication.h>
+#include <tdeconfig.h>
+#include <tdeapplication.h>
#include <kiconloader.h>
#include <knewstuff/entry.h>
@@ -50,18 +50,18 @@ struct DownloadDialog::Private
{
TQString m_providerlist;
TQWidget *m_page;
- KListView *m_lvtmp_r, *m_lvtmp_d, *m_lvtmp_l;
+ TDEListView *m_lvtmp_r, *m_lvtmp_d, *m_lvtmp_l;
TQPtrList<Entry> m_installlist;
- TQMap<KIO::Job*, Provider*> m_variantjobs;
- TQMap<KIO::Job*, TQStringList> m_variants;
+ TQMap<TDEIO::Job*, Provider*> m_variantjobs;
+ TQMap<TDEIO::Job*, TQStringList> m_variants;
TQMap<Provider*, Provider*> m_newproviders;
};
-class NumSortListViewItem : public KListViewItem
+class NumSortListViewItem : public TDEListViewItem
{
public:
NumSortListViewItem( TQListView * parent, TQString label1, TQString label2 = TQString::null, TQString label3 = TQString::null, TQString label4 = TQString::null, TQString label5 = TQString::null, TQString label6 = TQString::null, TQString label7 = TQString::null, TQString label8 = TQString::null ) :
- KListViewItem( parent, label1, label2, label3, label4, label5, label6, label7, label8 )
+ TDEListViewItem( parent, label1, label2, label3, label4, label5, label6, label7, label8 )
{
}
@@ -72,15 +72,15 @@ class NumSortListViewItem : public KListViewItem
s.sprintf("%08d", text(col).toInt());
return s;
}
- return KListViewItem::key( col, asc );
+ return TDEListViewItem::key( col, asc );
}
};
-class DateSortListViewItem : public KListViewItem
+class DateSortListViewItem : public TDEListViewItem
{
public:
DateSortListViewItem( TQListView * parent, TQString label1, TQString label2 = TQString::null, TQString label3 = TQString::null, TQString label4 = TQString::null, TQString label5 = TQString::null, TQString label6 = TQString::null, TQString label7 = TQString::null, TQString label8 = TQString::null ) :
- KListViewItem( parent, label1, label2, label3, label4, label5, label6, label7, label8 )
+ TDEListViewItem( parent, label1, label2, label3, label4, label5, label6, label7, label8 )
{
}
@@ -88,11 +88,11 @@ class DateSortListViewItem : public KListViewItem
if (col == 2)
{
TQString s;
- TQDate date = KGlobal::locale()->readDate(text(col));
+ TQDate date = TDEGlobal::locale()->readDate(text(col));
s.sprintf("%08d", date.year() * 366 + date.dayOfYear());
return s;
}
- return KListViewItem::key( col, asc );
+ return TDEListViewItem::key( col, asc );
}
};
@@ -157,7 +157,7 @@ DownloadDialog::~DownloadDialog()
{
for (TQMap<TQWidget *, TQValueList<TQPushButton *>* >::const_iterator it = m_buttons.constBegin(); it != m_buttons.constEnd(); ++it)
delete it.data();
- for (TQMap<TQWidget *, TQValueList<KListView *>* >::const_iterator it = m_map.constBegin(); it != m_map.constEnd(); ++it)
+ for (TQMap<TQWidget *, TQValueList<TDEListView *>* >::const_iterator it = m_map.constBegin(); it != m_map.constEnd(); ++it)
delete it.data();
delete d;
}
@@ -174,11 +174,11 @@ void DownloadDialog::load(TQString providerList)
void DownloadDialog::clear()
{
- TQMap<TQWidget*, TQValueList<KListView*>* >::Iterator it;
- TQMap<TQWidget*, TQValueList<KListView*>* >::Iterator end(m_map.end());
+ TQMap<TQWidget*, TQValueList<TDEListView*>* >::Iterator it;
+ TQMap<TQWidget*, TQValueList<TDEListView*>* >::Iterator end(m_map.end());
for(it = m_map.begin(); it != end; ++it)
{
- TQValueList<KListView*> *v = it.data();
+ TQValueList<TDEListView*> *v = it.data();
kdDebug() << "clear listviews in " << v << endl;
if(v)
{
@@ -237,16 +237,16 @@ void DownloadDialog::addProvider(Provider *p)
{
if(!p->icon().protocol().isEmpty())
{
- ret = KIO::NetAccess::download(p->icon(), tmp, this);
+ ret = TDEIO::NetAccess::download(p->icon(), tmp, this);
if(ret) pix = TQPixmap(tmp);
}
else
{
- pix = KGlobal::iconLoader()->loadIcon(p->icon().path(), KIcon::Panel);
+ pix = TDEGlobal::iconLoader()->loadIcon(p->icon().path(), TDEIcon::Panel);
ret = true;
}
}
- if(!ret) pix = KGlobal::iconLoader()->loadIcon("knewstuff", KIcon::Panel);
+ if(!ret) pix = TDEGlobal::iconLoader()->loadIcon("knewstuff", TDEIcon::Panel);
frame = addPage(p->name(), p->name(), pix);
m_frame = frame;
@@ -266,19 +266,19 @@ void DownloadDialog::addProvider(Provider *p)
TQHBoxLayout *box = new TQHBoxLayout(frame);
box->add(ctl);
- d->m_lvtmp_r = new KListView(w_r);
+ d->m_lvtmp_r = new TDEListView(w_r);
d->m_lvtmp_r->addColumn(i18n("Name"));
d->m_lvtmp_r->addColumn(i18n("Version"));
d->m_lvtmp_r->addColumn(i18n("Rating"));
d->m_lvtmp_r->setSorting(2, false);
- d->m_lvtmp_d = new KListView(w_d);
+ d->m_lvtmp_d = new TDEListView(w_d);
d->m_lvtmp_d->addColumn(i18n("Name"));
d->m_lvtmp_d->addColumn(i18n("Version"));
d->m_lvtmp_d->addColumn(i18n("Downloads"));
d->m_lvtmp_d->setSorting(2, false);
- d->m_lvtmp_l = new KListView(w_l);
+ d->m_lvtmp_l = new TDEListView(w_l);
d->m_lvtmp_l->addColumn(i18n("Name"));
d->m_lvtmp_l->addColumn(i18n("Version"));
d->m_lvtmp_l->addColumn(i18n("Release Date"));
@@ -315,7 +315,7 @@ void DownloadDialog::addProvider(Provider *p)
TQVBoxLayout *box4 = new TQVBoxLayout(w_l);
box4->add(d->m_lvtmp_l);
- TQValueList<KListView*> *v = new TQValueList<KListView*>;
+ TQValueList<TDEListView*> *v = new TQValueList<TDEListView*>;
*v << d->m_lvtmp_r << d->m_lvtmp_d << d->m_lvtmp_l;
m_map[frame] = v;
m_rts[frame] = rt;
@@ -331,7 +331,7 @@ void DownloadDialog::addProvider(Provider *p)
TQTimer::singleShot(100, this, TQT_SLOT(slotFinish()));
}
-void DownloadDialog::slotResult(KIO::Job *job)
+void DownloadDialog::slotResult(TDEIO::Job *job)
{
TQDomDocument dom;
TQDomElement knewstuff;
@@ -392,7 +392,7 @@ int DownloadDialog::installStatus(Entry *entry)
TQString datestring;
int installed;
- TQString lang = KGlobal::locale()->language();
+ TQString lang = TDEGlobal::locale()->language();
kapp->config()->setGroup("KNewStuffStatus");
datestring = kapp->config()->readEntry(entry->name(lang));
@@ -415,28 +415,28 @@ void DownloadDialog::addEntry(Entry *entry, const TQStringList& variants)
installed = installStatus(entry);
- if(installed > 0) pix = KGlobal::iconLoader()->loadIcon("ok", KIcon::Small);
- else if(installed < 0) pix = KGlobal::iconLoader()->loadIcon("history", KIcon::Small);
+ if(installed > 0) pix = TDEGlobal::iconLoader()->loadIcon("ok", TDEIcon::Small);
+ else if(installed < 0) pix = TDEGlobal::iconLoader()->loadIcon("history", TDEIcon::Small);
else pix = TQPixmap();
- TQString lang = KGlobal::locale()->language();
+ TQString lang = TDEGlobal::locale()->language();
if(variants.contains("score"))
{
- KListViewItem *tmp_r = new NumSortListViewItem(lv_r,
+ TDEListViewItem *tmp_r = new NumSortListViewItem(lv_r,
entry->name(lang), entry->version(), TQString("%1").arg(entry->rating()));
tmp_r->setPixmap(0, pix);
}
if(variants.contains("downloads"))
{
- KListViewItem *tmp_d = new NumSortListViewItem(lv_d,
+ TDEListViewItem *tmp_d = new NumSortListViewItem(lv_d,
entry->name(lang), entry->version(), TQString("%1").arg(entry->downloads()));
tmp_d->setPixmap(0, pix);
}
if(variants.contains("latest"))
{
- KListViewItem *tmp_l = new DateSortListViewItem(lv_l,
- entry->name(lang), entry->version(), KGlobal::locale()->formatDate(entry->releaseDate()));
+ TDEListViewItem *tmp_l = new DateSortListViewItem(lv_l,
+ entry->name(lang), entry->version(), TDEGlobal::locale()->formatDate(entry->releaseDate()));
tmp_l->setPixmap(0, pix);
}
@@ -459,7 +459,7 @@ void DownloadDialog::addEntry(Entry *entry)
kdDebug() << "added entry " << entry->name() << endl;
}
-void DownloadDialog::slotData(KIO::Job *job, const TQByteArray &a)
+void DownloadDialog::slotData(TDEIO::Job *job, const TQByteArray &a)
{
TQCString tmp(a, a.size() + 1);
m_data[job].append(TQString::fromUtf8(tmp));
@@ -470,7 +470,7 @@ void DownloadDialog::slotDetails()
Entry *e = getEntry();
if(!e) return;
- TQString lang = KGlobal::locale()->language();
+ TQString lang = TDEGlobal::locale()->language();
TQString info = i18n
(
@@ -490,7 +490,7 @@ void DownloadDialog::slotDetails()
).arg(e->release()
).arg(e->rating()
).arg(e->downloads()
- ).arg(KGlobal::locale()->formatDate(e->releaseDate())
+ ).arg(TDEGlobal::locale()->formatDate(e->releaseDate())
).arg(e->summary(lang)
);
@@ -539,8 +539,8 @@ void DownloadDialog::slotInstall()
KURL source = e->payload();
KURL dest = KURL(m_s->downloadDestination(e));
- KIO::FileCopyJob *job = KIO::file_copy(source, dest, -1, true);
- connect(job, TQT_SIGNAL(result(KIO::Job*)), TQT_SLOT(slotInstalled(KIO::Job*)));
+ TDEIO::FileCopyJob *job = TDEIO::file_copy(source, dest, -1, true);
+ connect(job, TQT_SIGNAL(result(TDEIO::Job*)), TQT_SLOT(slotInstalled(TDEIO::Job*)));
}
}
@@ -550,9 +550,9 @@ void DownloadDialog::install(Entry *e)
kapp->config()->writeEntry(m_entryname, TQString(e->releaseDate().toString(Qt::ISODate)));
kapp->config()->sync();
- TQPixmap pix = KGlobal::iconLoader()->loadIcon("ok", KIcon::Small);
+ TQPixmap pix = TDEGlobal::iconLoader()->loadIcon("ok", TDEIcon::Small);
- TQString lang = KGlobal::locale()->language();
+ TQString lang = TDEGlobal::locale()->language();
if(m_entryitem)
{
@@ -580,12 +580,12 @@ void DownloadDialog::install(Entry *e)
d->m_lvtmp_d->setEnabled( true );
}
-void DownloadDialog::slotInstalled(KIO::Job *job)
+void DownloadDialog::slotInstalled(TDEIO::Job *job)
{
bool ret = job && (job->error() == 0);
if(ret)
{
- KIO::FileCopyJob *cjob = ::tqqt_cast<KIO::FileCopyJob*>(job);
+ TDEIO::FileCopyJob *cjob = ::tqqt_cast<TDEIO::FileCopyJob*>(job);
if(cjob)
{
ret = m_s->install(cjob->destURL().path());
@@ -640,12 +640,12 @@ void DownloadDialog::slotSelected()
TQString tmp;
bool enabled;
Entry *e = getEntry();
- TQString lang = KGlobal::locale()->language();
+ TQString lang = TDEGlobal::locale()->language();
bool ret;
if(e)
{
- TQString lang = KGlobal::locale()->language();
+ TQString lang = TDEGlobal::locale()->language();
TQListViewItem *item;
if(m_curtab != 0)
@@ -673,7 +673,7 @@ void DownloadDialog::slotSelected()
}
else
{
- ret = KIO::NetAccess::download(e->preview(lang), tmp, this);
+ ret = TDEIO::NetAccess::download(e->preview(lang), tmp, this);
}
TQString desc = TQString("<b>%1</b><br>").arg(e->name(lang));
@@ -685,7 +685,7 @@ void DownloadDialog::slotSelected()
{
desc += TQString("%1").arg(e->author());
}
- desc += TQString("<br>%1").arg(KGlobal::locale()->formatDate(e->releaseDate()));
+ desc += TQString("<br>%1").arg(TDEGlobal::locale()->formatDate(e->releaseDate()));
desc += TQString("<br><br>");
if(ret)
{
@@ -728,7 +728,7 @@ Entry *DownloadDialog::getEntry()
TQString entryName = entryItem->text(0);
- TQString lang = KGlobal::locale()->language();
+ TQString lang = TDEGlobal::locale()->language();
for(Entry *e = m_entries.first(); e; e = m_entries.next())
if(e->name(lang) == entryName)
@@ -770,7 +770,7 @@ void DownloadDialog::slotPage(TQWidget *w)
void DownloadDialog::loadProvider(Provider *p)
{
- TQMap<KIO::Job*, Provider*>::Iterator it;
+ TQMap<TDEIO::Job*, Provider*>::Iterator it;
for(it = d->m_variantjobs.begin(); it != d->m_variantjobs.end(); it++)
{
@@ -810,15 +810,15 @@ void DownloadDialog::loadProvider(Provider *p)
TQString url = it.key();
TQStringList urlvariants = it.data();
- KIO::TransferJob *variantjob = KIO::get(url);
+ TDEIO::TransferJob *variantjob = TDEIO::get(url);
d->m_newproviders[p] = p;
d->m_variantjobs[variantjob] = p;
d->m_variants[variantjob] = urlvariants;
m_data[variantjob] = "";
- connect(variantjob, TQT_SIGNAL(result(KIO::Job*)), TQT_SLOT(slotResult(KIO::Job*)));
- connect(variantjob, TQT_SIGNAL(data(KIO::Job*, const TQByteArray&)),
- TQT_SLOT(slotData(KIO::Job*, const TQByteArray&)));
+ connect(variantjob, TQT_SIGNAL(result(TDEIO::Job*)), TQT_SLOT(slotResult(TDEIO::Job*)));
+ connect(variantjob, TQT_SIGNAL(data(TDEIO::Job*, const TQByteArray&)),
+ TQT_SLOT(slotData(TDEIO::Job*, const TQByteArray&)));
}
if(variants.count() == 0) return;
@@ -827,7 +827,7 @@ void DownloadDialog::loadProvider(Provider *p)
kdDebug() << "-- reached old downloadurl section; variants left: " << variants.count() << endl;
- KIO::TransferJob *job = KIO::get(p->downloadUrl());
+ TDEIO::TransferJob *job = TDEIO::get(p->downloadUrl());
d->m_newproviders[p] = p;
d->m_variantjobs[job] = p;
@@ -835,9 +835,9 @@ void DownloadDialog::loadProvider(Provider *p)
//m_jobs[job] = p; // not used anymore due to variants
m_data[job] = "";
- connect(job, TQT_SIGNAL(result(KIO::Job*)), TQT_SLOT(slotResult(KIO::Job*)));
- connect(job, TQT_SIGNAL(data(KIO::Job*, const TQByteArray&)),
- TQT_SLOT(slotData(KIO::Job*, const TQByteArray&)));
+ connect(job, TQT_SIGNAL(result(TDEIO::Job*)), TQT_SLOT(slotResult(TDEIO::Job*)));
+ connect(job, TQT_SIGNAL(data(TDEIO::Job*, const TQByteArray&)),
+ TQT_SLOT(slotData(TDEIO::Job*, const TQByteArray&)));
}
void DownloadDialog::setType(TQString type)
diff --git a/knewstuff/downloaddialog.h b/knewstuff/downloaddialog.h
index 2c30ee9ba..1d61d259d 100644
--- a/knewstuff/downloaddialog.h
+++ b/knewstuff/downloaddialog.h
@@ -23,12 +23,12 @@
#include <kdialogbase.h>
#include <knewstuff/provider.h>
-namespace KIO
+namespace TDEIO
{
class Job;
}
-class KListView;
+class TDEListView;
class TQTextBrowser;
class TQFrame;
class KNewStuffGeneric;
@@ -112,7 +112,7 @@ class KDE_EXPORT DownloadDialog : public KDialogBase
a previously set type.
@param providerList the URl to the list of providers; if empty
- we first try the ProvidersUrl from KGlobal::config, then we
+ we first try the ProvidersUrl from TDEGlobal::config, then we
fall back to a hardcoded value.
*/
void load(TQString providerList); // KDE4: merge with load() above
@@ -211,11 +211,11 @@ class KDE_EXPORT DownloadDialog : public KDialogBase
void slotOk();
private slots:
- void slotResult(KIO::Job *job);
- void slotData(KIO::Job *job, const TQByteArray &a);
+ void slotResult(TDEIO::Job *job);
+ void slotData(TDEIO::Job *job, const TQByteArray &a);
void slotInstall();
void slotDetails();
- void slotInstalled(KIO::Job *job);
+ void slotInstalled(TDEIO::Job *job);
void slotTab();
void slotSelected();
void slotPage(TQWidget *w);
@@ -232,7 +232,7 @@ class KDE_EXPORT DownloadDialog : public KDialogBase
ProviderLoader *m_loader;
TQString m_entryname;
- KListView *lv_r, *lv_d, *lv_l;
+ TDEListView *lv_r, *lv_d, *lv_l;
TQTextBrowser *m_rt;
TQFrame *m_frame;
TQListViewItem *m_entryitem;
@@ -240,12 +240,12 @@ class KDE_EXPORT DownloadDialog : public KDialogBase
Entry *m_entry;
KNewStuffGeneric *m_s;
int m_curtab;
- TQMap<TQWidget*, TQValueList<KListView*>* > m_map;
+ TQMap<TQWidget*, TQValueList<TDEListView*>* > m_map;
TQMap<TQWidget*, Provider*> m_providers;
TQMap<TQWidget*, TQTextBrowser*> m_rts;
TQMap<TQWidget*, TQValueList<TQPushButton*>* > m_buttons;
- TQMap<KIO::Job*, Provider*> m_jobs;
- TQMap<KIO::Job*, TQString> m_data;
+ TQMap<TDEIO::Job*, Provider*> m_jobs;
+ TQMap<TDEIO::Job*, TQString> m_data;
TQString m_filter;
Engine *m_engine;
Private *d;
diff --git a/knewstuff/engine.cpp b/knewstuff/engine.cpp
index e460c2318..2b33e85f5 100644
--- a/knewstuff/engine.cpp
+++ b/knewstuff/engine.cpp
@@ -22,11 +22,11 @@
#include <tqdom.h>
#include <tqfileinfo.h>
-#include <kapplication.h>
+#include <tdeapplication.h>
#include <kdebug.h>
-#include <kio/job.h>
-#include <klocale.h>
-#include <kmessagebox.h>
+#include <tdeio/job.h>
+#include <tdelocale.h>
+#include <tdemessagebox.h>
#include <kstandarddirs.h>
#include "knewstuff.h"
@@ -104,18 +104,18 @@ void Engine::getMetaInformation( Provider::List *providers )
for ( p = providers->first(); p; p = providers->next() ) {
if ( p->downloadUrl().isEmpty() ) continue;
- KIO::TransferJob *job = KIO::get( p->downloadUrl(), false, false );
- connect( job, TQT_SIGNAL( result( KIO::Job * ) ),
- TQT_SLOT( slotNewStuffJobResult( KIO::Job * ) ) );
- connect( job, TQT_SIGNAL( data( KIO::Job *, const TQByteArray & ) ),
- TQT_SLOT( slotNewStuffJobData( KIO::Job *, const TQByteArray & ) ) );
+ TDEIO::TransferJob *job = TDEIO::get( p->downloadUrl(), false, false );
+ connect( job, TQT_SIGNAL( result( TDEIO::Job * ) ),
+ TQT_SLOT( slotNewStuffJobResult( TDEIO::Job * ) ) );
+ connect( job, TQT_SIGNAL( data( TDEIO::Job *, const TQByteArray & ) ),
+ TQT_SLOT( slotNewStuffJobData( TDEIO::Job *, const TQByteArray & ) ) );
mNewStuffJobData.insert( job, "" );
mProviderJobs[ job ] = p;
}
}
-void Engine::slotNewStuffJobData( KIO::Job *job, const TQByteArray &data )
+void Engine::slotNewStuffJobData( TDEIO::Job *job, const TQByteArray &data )
{
if ( data.isEmpty() ) return;
@@ -126,7 +126,7 @@ void Engine::slotNewStuffJobData( KIO::Job *job, const TQByteArray &data )
mNewStuffJobData[ job ].append( TQString::fromUtf8( str ) );
}
-void Engine::slotNewStuffJobResult( KIO::Job *job )
+void Engine::slotNewStuffJobResult( TDEIO::Job *job )
{
if ( job->error() ) {
kdDebug() << "Error downloading new stuff descriptions." << endl;
@@ -199,12 +199,12 @@ void Engine::download( Entry *entry )
kdDebug() << " SOURCE: " << source.url() << endl;
kdDebug() << " DESTINATION: " << destination.url() << endl;
- KIO::FileCopyJob *job = KIO::file_copy( source, destination, -1, true );
- connect( job, TQT_SIGNAL( result( KIO::Job * ) ),
- TQT_SLOT( slotDownloadJobResult( KIO::Job * ) ) );
+ TDEIO::FileCopyJob *job = TDEIO::file_copy( source, destination, -1, true );
+ connect( job, TQT_SIGNAL( result( TDEIO::Job * ) ),
+ TQT_SLOT( slotDownloadJobResult( TDEIO::Job * ) ) );
}
-void Engine::slotDownloadJobResult( KIO::Job *job )
+void Engine::slotDownloadJobResult( TDEIO::Job *job )
{
if ( job->error() ) {
kdDebug() << "Error downloading new stuff payload." << endl;
@@ -321,9 +321,9 @@ void Engine::upload( Entry *entry )
KURL destination = mUploadProvider->uploadUrl();
destination.setFileName( fi.fileName() );
- KIO::FileCopyJob *job = KIO::file_copy( KURL::fromPathOrURL( mUploadFile ), destination );
- connect( job, TQT_SIGNAL( result( KIO::Job * ) ),
- TQT_SLOT( slotUploadPayloadJobResult( KIO::Job * ) ) );
+ TDEIO::FileCopyJob *job = TDEIO::file_copy( KURL::fromPathOrURL( mUploadFile ), destination );
+ connect( job, TQT_SIGNAL( result( TDEIO::Job * ) ),
+ TQT_SLOT( slotUploadPayloadJobResult( TDEIO::Job * ) ) );
} else {
emit uploadFinished( false );
}
@@ -364,7 +364,7 @@ bool Engine::createMetaFile( Entry *entry )
return true;
}
-void Engine::slotUploadPayloadJobResult( KIO::Job *job )
+void Engine::slotUploadPayloadJobResult( TDEIO::Job *job )
{
if ( job->error() ) {
kdDebug() << "Error uploading new stuff payload." << endl;
@@ -383,12 +383,12 @@ void Engine::slotUploadPayloadJobResult( KIO::Job *job )
KURL previewDestination = mUploadProvider->uploadUrl();
previewDestination.setFileName( fi.fileName() );
- KIO::FileCopyJob *newJob = KIO::file_copy( KURL::fromPathOrURL( mPreviewFile ), previewDestination );
- connect( newJob, TQT_SIGNAL( result( KIO::Job * ) ),
- TQT_SLOT( slotUploadPreviewJobResult( KIO::Job * ) ) );
+ TDEIO::FileCopyJob *newJob = TDEIO::file_copy( KURL::fromPathOrURL( mPreviewFile ), previewDestination );
+ connect( newJob, TQT_SIGNAL( result( TDEIO::Job * ) ),
+ TQT_SLOT( slotUploadPreviewJobResult( TDEIO::Job * ) ) );
}
-void Engine::slotUploadPreviewJobResult( KIO::Job *job )
+void Engine::slotUploadPreviewJobResult( TDEIO::Job *job )
{
if ( job->error() ) {
kdDebug() << "Error uploading new stuff preview." << endl;
@@ -402,12 +402,12 @@ void Engine::slotUploadPreviewJobResult( KIO::Job *job )
KURL metaDestination = mUploadProvider->uploadUrl();
metaDestination.setFileName( fi.fileName() );
- KIO::FileCopyJob *newJob = KIO::file_copy( KURL::fromPathOrURL( mUploadMetaFile ), metaDestination );
- connect( newJob, TQT_SIGNAL( result( KIO::Job * ) ),
- TQT_SLOT( slotUploadMetaJobResult( KIO::Job * ) ) );
+ TDEIO::FileCopyJob *newJob = TDEIO::file_copy( KURL::fromPathOrURL( mUploadMetaFile ), metaDestination );
+ connect( newJob, TQT_SIGNAL( result( TDEIO::Job * ) ),
+ TQT_SLOT( slotUploadMetaJobResult( TDEIO::Job * ) ) );
}
-void Engine::slotUploadMetaJobResult( KIO::Job *job )
+void Engine::slotUploadMetaJobResult( TDEIO::Job *job )
{
mUploadMetaFile = TQString::null;
if ( job->error() ) {
diff --git a/knewstuff/engine.h b/knewstuff/engine.h
index f4b0b4920..374f9122d 100644
--- a/knewstuff/engine.h
+++ b/knewstuff/engine.h
@@ -27,7 +27,7 @@
#include "entry.h"
#include "provider.h"
-namespace KIO { class Job; }
+namespace TDEIO { class Job; }
class KNewStuff;
@@ -143,14 +143,14 @@ class KDE_EXPORT Engine : public TQObject
void getMetaInformation( Provider::List *providers );
void selectUploadProvider( Provider::List *providers );
- void slotNewStuffJobData( KIO::Job *job, const TQByteArray &data );
- void slotNewStuffJobResult( KIO::Job *job );
+ void slotNewStuffJobData( TDEIO::Job *job, const TQByteArray &data );
+ void slotNewStuffJobResult( TDEIO::Job *job );
- void slotDownloadJobResult( KIO::Job *job );
+ void slotDownloadJobResult( TDEIO::Job *job );
- void slotUploadPayloadJobResult( KIO::Job *job );
- void slotUploadPreviewJobResult (KIO::Job *job );
- void slotUploadMetaJobResult( KIO::Job *job );
+ void slotUploadPayloadJobResult( TDEIO::Job *job );
+ void slotUploadPreviewJobResult (TDEIO::Job *job );
+ void slotUploadMetaJobResult( TDEIO::Job *job );
protected:
bool createMetaFile( Entry * );
@@ -160,8 +160,8 @@ class KDE_EXPORT Engine : public TQObject
ProviderLoader *mProviderLoader;
- TQMap<KIO::Job *,TQString> mNewStuffJobData;
- TQMap<KIO::Job *,Provider *> mProviderJobs;
+ TQMap<TDEIO::Job *,TQString> mNewStuffJobData;
+ TQMap<TDEIO::Job *,Provider *> mProviderJobs;
TQPtrList<Entry> mNewStuffList;
diff --git a/knewstuff/entry.cpp b/knewstuff/entry.cpp
index 55d60579c..00f7df522 100644
--- a/knewstuff/entry.cpp
+++ b/knewstuff/entry.cpp
@@ -23,8 +23,8 @@
#include <tqptrdict.h>
#include <tqwindowdefs.h>
-#include <kglobal.h>
-#include <klocale.h>
+#include <tdeglobal.h>
+#include <tdelocale.h>
using namespace KNS;
@@ -72,7 +72,7 @@ TQString Entry::name( const TQString &lang ) const
if ( !d(this)->mNameMap[ lang ].isEmpty() ) return d(this)->mNameMap[ lang ];
else {
- TQStringList langs = KGlobal::locale()->languageList();
+ TQStringList langs = TDEGlobal::locale()->languageList();
for(TQStringList::Iterator it = langs.begin(); it != langs.end(); ++it)
if( !d(this)->mNameMap[ *it ].isEmpty() ) return d(this)->mNameMap[ *it ];
}
@@ -175,7 +175,7 @@ TQString Entry::summary( const TQString &lang ) const
if ( !mSummaryMap[ lang ].isEmpty() ) return mSummaryMap[ lang ];
else {
- TQStringList langs = KGlobal::locale()->languageList();
+ TQStringList langs = TDEGlobal::locale()->languageList();
for(TQStringList::Iterator it = langs.begin(); it != langs.end(); ++it)
if( !mSummaryMap[ *it ].isEmpty() ) return mSummaryMap[ *it ];
}
@@ -228,7 +228,7 @@ KURL Entry::payload( const TQString &lang ) const
{
KURL payload = mPayloadMap[ lang ];
if ( payload.isEmpty() ) {
- TQStringList langs = KGlobal::locale()->languageList();
+ TQStringList langs = TDEGlobal::locale()->languageList();
for(TQStringList::Iterator it = langs.begin(); it != langs.end(); ++it)
if( !mPayloadMap[ *it ].isEmpty() ) return mPayloadMap[ *it ];
}
@@ -251,7 +251,7 @@ KURL Entry::preview( const TQString &lang ) const
{
KURL preview = mPreviewMap[ lang ];
if ( preview.isEmpty() ) {
- TQStringList langs = KGlobal::locale()->languageList();
+ TQStringList langs = TDEGlobal::locale()->languageList();
for(TQStringList::Iterator it = langs.begin(); it != langs.end(); ++it)
if( !mPreviewMap[ *it ].isEmpty() ) return mPreviewMap[ *it ];
}
diff --git a/knewstuff/ghns.cpp b/knewstuff/ghns.cpp
index 90596da3d..0702f16bb 100644
--- a/knewstuff/ghns.cpp
+++ b/knewstuff/ghns.cpp
@@ -25,11 +25,11 @@
#include <tqtextstream.h>
#include <tqlabel.h>
-#include <kaboutdata.h>
-#include <kapplication.h>
+#include <tdeaboutdata.h>
+#include <tdeapplication.h>
#include <kdebug.h>
-#include <klocale.h>
-#include <kcmdlineargs.h>
+#include <tdelocale.h>
+#include <tdecmdlineargs.h>
#include <kprocess.h>
#include <kdialog.h>
@@ -78,10 +78,10 @@ void GhnsWidget::downloadWallpapers()
int main(int argc,char **argv)
{
- KAboutData aboutData("ghns","Get Hot New Stuff","0.1");
- KCmdLineArgs::init(argc,argv,&aboutData);
+ TDEAboutData aboutData("ghns","Get Hot New Stuff","0.1");
+ TDECmdLineArgs::init(argc,argv,&aboutData);
- KApplication app;
+ TDEApplication app;
GhnsWidget wid;
app.setMainWidget( &wid );
diff --git a/knewstuff/ghns.h b/knewstuff/ghns.h
index 727dc6a0f..74efc007e 100644
--- a/knewstuff/ghns.h
+++ b/knewstuff/ghns.h
@@ -25,7 +25,7 @@
#include <tqpushbutton.h>
-#include <kapplication.h>
+#include <tdeapplication.h>
#include <kdebug.h>
#include "knewstuff.h"
diff --git a/knewstuff/knewstuff.cpp b/knewstuff/knewstuff.cpp
index 6a37aa61d..b652ba4a8 100644
--- a/knewstuff/knewstuff.cpp
+++ b/knewstuff/knewstuff.cpp
@@ -18,10 +18,10 @@
Boston, MA 02110-1301, USA.
*/
-#include <kaction.h>
-#include <kapplication.h>
+#include <tdeaction.h>
+#include <tdeapplication.h>
#include <kdebug.h>
-#include <klocale.h>
+#include <tdelocale.h>
#include <kstandarddirs.h>
#include "engine.h"
@@ -30,12 +30,12 @@
using namespace KNS;
-KAction* KNS::standardAction(const TQString& what,
+TDEAction* KNS::standardAction(const TQString& what,
const TQObject *recvr,
- const char *slot, KActionCollection* parent,
+ const char *slot, TDEActionCollection* parent,
const char *name)
{
- return new KAction(i18n("Download New %1").arg(what), "knewstuff",
+ return new TDEAction(i18n("Download New %1").arg(what), "knewstuff",
0, recvr, slot, parent, name);
}
@@ -71,8 +71,8 @@ void KNewStuff::download()
TQString KNewStuff::downloadDestination( Entry * )
{
- return KGlobal::dirs()->saveLocation( "tmp" ) +
- KApplication::randomString( 10 );
+ return TDEGlobal::dirs()->saveLocation( "tmp" ) +
+ TDEApplication::randomString( 10 );
}
void KNewStuff::upload()
diff --git a/knewstuff/knewstuff.h b/knewstuff/knewstuff.h
index 5d2319aec..ca07c7f0d 100644
--- a/knewstuff/knewstuff.h
+++ b/knewstuff/knewstuff.h
@@ -26,17 +26,17 @@
class TQObject;
class TQWidget;
-class KAction;
-class KActionCollection;
+class TDEAction;
+class TDEActionCollection;
namespace KNS {
class Engine;
class Entry;
-KDE_EXPORT KAction* standardAction(const TQString& what,
+KDE_EXPORT TDEAction* standardAction(const TQString& what,
const TQObject *recvr,
const char *slot,
- KActionCollection* parent,
+ TDEActionCollection* parent,
const char *name = 0);
}
diff --git a/knewstuff/knewstuffbutton.cpp b/knewstuff/knewstuffbutton.cpp
index 3ad0d6ac6..3baa83397 100644
--- a/knewstuff/knewstuffbutton.cpp
+++ b/knewstuff/knewstuffbutton.cpp
@@ -18,7 +18,7 @@
*/
#include <kiconloader.h>
-#include <klocale.h>
+#include <tdelocale.h>
#include "downloaddialog.h"
#include "knewstuffbutton.h"
diff --git a/knewstuff/knewstuffbutton.h b/knewstuff/knewstuffbutton.h
index 6935ba653..bebd08297 100644
--- a/knewstuff/knewstuffbutton.h
+++ b/knewstuff/knewstuffbutton.h
@@ -46,7 +46,7 @@ class Button : public KPushButton
* @param what text describing what is being downloaded. will be
* shown on the button as "Download New <what>"
* @param providerList the URL to the list of providers; if empty
- * we first try the ProvidersUrl from KGlobal::config, then we
+ * we first try the ProvidersUrl from TDEGlobal::config, then we
* fall back to a hardcoded value
* @param resourceType the Hotstuff data type for this downlaod such
* as "korganizer/calendar"
diff --git a/knewstuff/knewstuffgeneric.cpp b/knewstuff/knewstuffgeneric.cpp
index 8438e25ea..ef6a37456 100644
--- a/knewstuff/knewstuffgeneric.cpp
+++ b/knewstuff/knewstuffgeneric.cpp
@@ -24,11 +24,11 @@
#include <tqdir.h>
#include <kdebug.h>
-#include <klocale.h>
+#include <tdelocale.h>
#include <kprocess.h>
-#include <kconfig.h>
+#include <tdeconfig.h>
#include <kstandarddirs.h>
-#include <kmessagebox.h>
+#include <tdemessagebox.h>
#include <ktar.h>
#include "entry.h"
@@ -40,7 +40,7 @@ using namespace std;
KNewStuffGeneric::KNewStuffGeneric( const TQString &type, TQWidget *parent )
: KNewStuff( type, parent )
{
- mConfig = KGlobal::config();
+ mConfig = TDEGlobal::config();
}
KNewStuffGeneric::~KNewStuffGeneric()
@@ -72,9 +72,9 @@ bool KNewStuffGeneric::install( const TQString &fileName )
for ( TQStringList::iterator it = list.begin(); it != list.end(); ++it ) {
list2 << (*it).replace("%f", fileName);
}
- KProcess proc;
+ TDEProcess proc;
proc << list2;
- proc.start( KProcess::Block );
+ proc.start( TDEProcess::Block );
}
return true;
@@ -134,7 +134,7 @@ TQString KNewStuffGeneric::downloadDestination( KNS::Entry *entry )
{
TQString file = destinationPath(entry);
- if ( KStandardDirs::exists( file ) ) {
+ if ( TDEStandardDirs::exists( file ) ) {
int result = KMessageBox::warningContinueCancel( parentWidget(),
i18n("The file '%1' already exists. Do you want to overwrite it?")
.arg( file ),
diff --git a/knewstuff/knewstuffgeneric.h b/knewstuff/knewstuffgeneric.h
index 6347bf539..053f83a05 100644
--- a/knewstuff/knewstuffgeneric.h
+++ b/knewstuff/knewstuffgeneric.h
@@ -23,7 +23,7 @@
#include "knewstuff.h"
-class KConfig;
+class TDEConfig;
/**
* @short Basic KNewStuff class with predefined actions.
@@ -80,7 +80,7 @@ class KDE_EXPORT KNewStuffGeneric : public KNewStuff
private:
TQString destinationPath( KNS::Entry *entry );
- KConfig *mConfig;
+ TDEConfig *mConfig;
};
#endif
diff --git a/knewstuff/knewstuffsecure.cpp b/knewstuff/knewstuffsecure.cpp
index f68be7ae3..67374800e 100644
--- a/knewstuff/knewstuffsecure.cpp
+++ b/knewstuff/knewstuffsecure.cpp
@@ -16,12 +16,12 @@
#include <tqfileinfo.h>
//kde includes
-#include <kconfig.h>
+#include <tdeconfig.h>
#include <kdebug.h>
-#include <kglobal.h>
-#include <kio/netaccess.h>
-#include <klocale.h>
-#include <kmessagebox.h>
+#include <tdeglobal.h>
+#include <tdeio/netaccess.h>
+#include <tdelocale.h>
+#include <tdemessagebox.h>
#include <kstandarddirs.h>
#include <ktar.h>
#include <ktempdir.h>
@@ -144,7 +144,7 @@ void KNewStuffSecure::slotValidated(int result)
emit installFinished();
} else
{
- KConfig *cfg = KGlobal::config();
+ TDEConfig *cfg = TDEGlobal::config();
cfg->deleteGroup("KNewStuffStatus");
cfg->setGroup("KNewStuffStatus");
for (TQMap<TQString, TQString>::ConstIterator it = m_installedResources.constBegin(); it != m_installedResources.constEnd(); ++it)
@@ -159,7 +159,7 @@ void KNewStuffSecure::slotValidated(int result)
void KNewStuffSecure::downloadResource()
{
- KConfig *cfg = KGlobal::config();
+ TDEConfig *cfg = TDEGlobal::config();
m_installedResources = cfg->entryMap("KNewStuffStatus");
engine()->ignoreInstallResult(true);
KNewStuff::download();
@@ -179,7 +179,7 @@ void KNewStuffSecure::uploadResource(const TQString& fileName)
m_tempDir->setAutoDelete(true);
TQFileInfo f(fileName);
m_signedFileName = m_tempDir->name() + "/" + f.fileName();
- KIO::NetAccess::file_copy(KURL::fromPathOrURL(fileName), KURL::fromPathOrURL(m_signedFileName), -1, true);
+ TDEIO::NetAccess::file_copy(KURL::fromPathOrURL(fileName), KURL::fromPathOrURL(m_signedFileName), -1, true);
Security::ref()->signFile(m_signedFileName);
}
@@ -215,7 +215,7 @@ void KNewStuffSecure::slotFileSigned(int result)
file.close();
}
tar.close();
- KIO::NetAccess::file_move(KURL::fromPathOrURL(m_signedFileName + ".signed"), KURL::fromPathOrURL(m_signedFileName), -1, true);
+ TDEIO::NetAccess::file_move(KURL::fromPathOrURL(m_signedFileName + ".signed"), KURL::fromPathOrURL(m_signedFileName), -1, true);
KNewStuff::upload(m_signedFileName, TQString::null);
disconnect(Security::ref(), TQT_SIGNAL(fileSigned(int)), this, TQT_SLOT(slotFileSigned(int)));
}
@@ -231,7 +231,7 @@ void KNewStuffSecure::removeTempDirectory()
{
if (m_tempDir)
{
- KIO::NetAccess::del(KURL().fromPathOrURL(m_tempDir->name()), parentWidget());
+ TDEIO::NetAccess::del(KURL().fromPathOrURL(m_tempDir->name()), parentWidget());
delete m_tempDir;
m_tempDir = 0L;
}
diff --git a/knewstuff/provider.cpp b/knewstuff/provider.cpp
index 3c4018a13..20f1668f7 100644
--- a/knewstuff/provider.cpp
+++ b/knewstuff/provider.cpp
@@ -18,12 +18,12 @@
Boston, MA 02110-1301, USA.
*/
-#include <kconfig.h>
+#include <tdeconfig.h>
#include <kdebug.h>
-#include <kio/job.h>
-#include <kglobal.h>
-#include <kmessagebox.h>
-#include <klocale.h>
+#include <tdeio/job.h>
+#include <tdeglobal.h>
+#include <tdemessagebox.h>
+#include <tdelocale.h>
#include <tqptrdict.h>
#include <tqwindowdefs.h>
@@ -219,7 +219,7 @@ void ProviderLoader::load( const TQString &type, const TQString &providersList )
mProviders.clear();
mJobData = "";
- KConfig *cfg = KGlobal::config();
+ TDEConfig *cfg = TDEGlobal::config();
cfg->setGroup("KNewStuff");
TQString providersUrl = providersList;
@@ -236,16 +236,16 @@ void ProviderLoader::load( const TQString &type, const TQString &providersList )
kdDebug() << "ProviderLoader::load(): providersUrl: " << providersUrl << endl;
- KIO::TransferJob *job = KIO::get( KURL( providersUrl ), false, false );
- connect( job, TQT_SIGNAL( result( KIO::Job * ) ),
- TQT_SLOT( slotJobResult( KIO::Job * ) ) );
- connect( job, TQT_SIGNAL( data( KIO::Job *, const TQByteArray & ) ),
- TQT_SLOT( slotJobData( KIO::Job *, const TQByteArray & ) ) );
+ TDEIO::TransferJob *job = TDEIO::get( KURL( providersUrl ), false, false );
+ connect( job, TQT_SIGNAL( result( TDEIO::Job * ) ),
+ TQT_SLOT( slotJobResult( TDEIO::Job * ) ) );
+ connect( job, TQT_SIGNAL( data( TDEIO::Job *, const TQByteArray & ) ),
+ TQT_SLOT( slotJobData( TDEIO::Job *, const TQByteArray & ) ) );
// job->dumpObjectInfo();
}
-void ProviderLoader::slotJobData( KIO::Job *, const TQByteArray &data )
+void ProviderLoader::slotJobData( TDEIO::Job *, const TQByteArray &data )
{
kdDebug() << "ProviderLoader::slotJobData()" << endl;
@@ -256,7 +256,7 @@ void ProviderLoader::slotJobData( KIO::Job *, const TQByteArray &data )
mJobData.append( TQString::fromUtf8( str ) );
}
-void ProviderLoader::slotJobResult( KIO::Job *job )
+void ProviderLoader::slotJobResult( TDEIO::Job *job )
{
if ( job->error() ) {
job->showErrorDialog( TQT_TQWIDGET(parent()) );
diff --git a/knewstuff/provider.h b/knewstuff/provider.h
index 37e2a8daf..2a0d54a12 100644
--- a/knewstuff/provider.h
+++ b/knewstuff/provider.h
@@ -28,7 +28,7 @@
#include <kurl.h>
-namespace KIO { class Job; }
+namespace TDEIO { class Job; }
namespace KNS {
@@ -186,7 +186,7 @@ class KDE_EXPORT ProviderLoader : public TQObject
*
* @param type data type such as 'kdesktop/wallpaper'.
* @param providerList the URl to the list of providers; if empty
- * we first try the ProvidersUrl from KGlobal::config, then we
+ * we first try the ProvidersUrl from TDEGlobal::config, then we
* fall back to a hardcoded value.
*/
void load( const TQString &type, const TQString &providerList = TQString::null );
@@ -198,8 +198,8 @@ class KDE_EXPORT ProviderLoader : public TQObject
void providersLoaded( Provider::List * );
protected slots:
- void slotJobData( KIO::Job *, const TQByteArray & );
- void slotJobResult( KIO::Job * );
+ void slotJobData( TDEIO::Job *, const TQByteArray & );
+ void slotJobResult( TDEIO::Job * );
private:
TQWidget *mParentWidget;
diff --git a/knewstuff/providerdialog.cpp b/knewstuff/providerdialog.cpp
index a66258701..f71558ecd 100644
--- a/knewstuff/providerdialog.cpp
+++ b/knewstuff/providerdialog.cpp
@@ -22,9 +22,9 @@
#include <tqstring.h>
#include <tqlabel.h>
-#include <klistview.h>
-#include <klocale.h>
-#include <kmessagebox.h>
+#include <tdelistview.h>
+#include <tdelocale.h>
+#include <tdemessagebox.h>
#include "engine.h"
#include "provider.h"
@@ -34,11 +34,11 @@
using namespace KNS;
-class ProviderItem : public KListViewItem
+class ProviderItem : public TDEListViewItem
{
public:
- ProviderItem( KListView *parent, Provider *provider ) :
- KListViewItem( parent ), mProvider( provider )
+ ProviderItem( TDEListView *parent, Provider *provider ) :
+ TDEListViewItem( parent ), mProvider( provider )
{
setText( 0, provider->name() );
}
@@ -61,7 +61,7 @@ ProviderDialog::ProviderDialog( Engine *engine, TQWidget *parent ) :
TQLabel *description = new TQLabel( i18n("Please select one of the providers listed below:"), topPage );
topLayout->addWidget( description );
- mListView = new KListView( topPage );
+ mListView = new TDEListView( topPage );
mListView->addColumn( i18n("Name") );
topLayout->addWidget( mListView );
}
diff --git a/knewstuff/providerdialog.h b/knewstuff/providerdialog.h
index 3e02e30aa..549a65416 100644
--- a/knewstuff/providerdialog.h
+++ b/knewstuff/providerdialog.h
@@ -22,7 +22,7 @@
#include <kdialogbase.h>
-class KListView;
+class TDEListView;
namespace KNS {
@@ -68,7 +68,7 @@ class ProviderDialog : public KDialogBase
private:
Engine *mEngine;
- KListView *mListView;
+ TDEListView *mListView;
};
}
diff --git a/knewstuff/security.cpp b/knewstuff/security.cpp
index 247c6d5bc..d161c2969 100644
--- a/knewstuff/security.cpp
+++ b/knewstuff/security.cpp
@@ -22,9 +22,9 @@
//kde includes
#include <kdebug.h>
#include <kinputdialog.h>
-#include <klocale.h>
+#include <tdelocale.h>
#include <kmdcodec.h>
-#include <kmessagebox.h>
+#include <tdemessagebox.h>
#include <kpassdlg.h>
#include <kprocio.h>
@@ -57,9 +57,9 @@ void Security::readKeys()
m_keys.clear();
KProcIO *readProcess=new KProcIO();
*readProcess << "gpg"<<"--no-secmem-warning"<<"--no-tty"<<"--with-colon"<<"--list-keys";
- connect(readProcess, TQT_SIGNAL(processExited(KProcess *)), this, TQT_SLOT(slotProcessExited(KProcess *)));
+ connect(readProcess, TQT_SIGNAL(processExited(TDEProcess *)), this, TQT_SLOT(slotProcessExited(TDEProcess *)));
connect(readProcess, TQT_SIGNAL(readReady(KProcIO *)) ,this, TQT_SLOT(slotDataArrived(KProcIO *)));
- if (!readProcess->start(KProcess::NotifyOnExit, true))
+ if (!readProcess->start(TDEProcess::NotifyOnExit, true))
KMessageBox::error(0L, i18n("<qt>Cannot start <i>gpg</i> and retrieve the available keys. Make sure that <i>gpg</i> is installed, otherwise verification of downloaded resources will not be possible.</qt>"));
else
m_gpgRunning = true;
@@ -75,13 +75,13 @@ void Security::readSecretKeys()
m_runMode = ListSecret;
KProcIO *readProcess=new KProcIO();
*readProcess << "gpg"<<"--no-secmem-warning"<<"--no-tty"<<"--with-colon"<<"--list-secret-keys";
- connect(readProcess, TQT_SIGNAL(processExited(KProcess *)), this, TQT_SLOT(slotProcessExited(KProcess *)));
+ connect(readProcess, TQT_SIGNAL(processExited(TDEProcess *)), this, TQT_SLOT(slotProcessExited(TDEProcess *)));
connect(readProcess, TQT_SIGNAL(readReady(KProcIO *)) ,this, TQT_SLOT(slotDataArrived(KProcIO *)));
- if (readProcess->start(KProcess::NotifyOnExit, true))
+ if (readProcess->start(TDEProcess::NotifyOnExit, true))
m_gpgRunning = true;
}
-void Security::slotProcessExited(KProcess *process)
+void Security::slotProcessExited(TDEProcess *process)
{
switch (m_runMode)
{
@@ -248,9 +248,9 @@ void Security::slotCheckValidity()
//verify the signature
KProcIO *verifyProcess=new KProcIO();
*verifyProcess<<"gpg"<<"--no-secmem-warning"<<"--status-fd=2"<<"--command-fd=0"<<"--verify" << f.dirPath() + "/signature"<< m_fileName;
- connect(verifyProcess, TQT_SIGNAL(processExited(KProcess *)),this, TQT_SLOT(slotProcessExited(KProcess *)));
+ connect(verifyProcess, TQT_SIGNAL(processExited(TDEProcess *)),this, TQT_SLOT(slotProcessExited(TDEProcess *)));
connect(verifyProcess, TQT_SIGNAL(readReady(KProcIO *)),this, TQT_SLOT(slotDataArrived(KProcIO *)));
- if (verifyProcess->start(KProcess::NotifyOnExit,true))
+ if (verifyProcess->start(TDEProcess::NotifyOnExit,true))
m_gpgRunning = true;
else
{
@@ -328,10 +328,10 @@ void Security::slotSignFile()
//verify the signature
KProcIO *signProcess=new KProcIO();
*signProcess<<"gpg"<<"--no-secmem-warning"<<"--status-fd=2"<<"--command-fd=0"<<"--no-tty"<<"--detach-sign" << "-u" << m_secretKey << "-o" << f.dirPath() + "/signature" << m_fileName;
- connect(signProcess, TQT_SIGNAL(processExited(KProcess *)),this, TQT_SLOT(slotProcessExited(KProcess *)));
+ connect(signProcess, TQT_SIGNAL(processExited(TDEProcess *)),this, TQT_SLOT(slotProcessExited(TDEProcess *)));
connect(signProcess, TQT_SIGNAL(readReady(KProcIO *)),this, TQT_SLOT(slotDataArrived(KProcIO *)));
m_runMode = Sign;
- if (signProcess->start(KProcess::NotifyOnExit,true))
+ if (signProcess->start(TDEProcess::NotifyOnExit,true))
m_gpgRunning = true;
else
{
diff --git a/knewstuff/security.h b/knewstuff/security.h
index 2831770e0..230821e7e 100644
--- a/knewstuff/security.h
+++ b/knewstuff/security.h
@@ -22,7 +22,7 @@
#include <tqobject.h>
class KProcIO;
-class KProcess;
+class TDEProcess;
struct KeyStruct {
TQString id;
@@ -120,7 +120,7 @@ private:
TQString m_secretKey; /// the key used for signing
private slots:
- void slotProcessExited(KProcess *process);
+ void slotProcessExited(TDEProcess *process);
void slotDataArrived(KProcIO *process);
signals:
diff --git a/knewstuff/khotnewstuff.cpp b/knewstuff/tdehotnewstuff.cpp
index e479bd3b3..fb9e92a9b 100644
--- a/knewstuff/khotnewstuff.cpp
+++ b/knewstuff/tdehotnewstuff.cpp
@@ -18,31 +18,31 @@
Boston, MA 02110-1301, USA.
*/
-#include <kapplication.h>
+#include <tdeapplication.h>
#include <kdebug.h>
-#include <klocale.h>
-#include <kcmdlineargs.h>
-#include <kaboutdata.h>
+#include <tdelocale.h>
+#include <tdecmdlineargs.h>
+#include <tdeaboutdata.h>
#include "downloaddialog.h"
-static const KCmdLineOptions op[] =
+static const TDECmdLineOptions op[] =
{
{"type <type>", I18N_NOOP("Display only media of this type"), 0},
{"+[providerlist]", I18N_NOOP("Provider list to use"), 0},
- KCmdLineLastOption
+ TDECmdLineLastOption
};
int main(int argc, char **argv)
{
- KAboutData about("khotnewstuff", "KHotNewStuff", "0.2");
- KCmdLineArgs *args;
+ TDEAboutData about("tdehotnewstuff", "KHotNewStuff", "0.2");
+ TDECmdLineArgs *args;
- KCmdLineArgs::init(argc, argv, &about);
- KCmdLineArgs::addCmdLineOptions(op);
- args = KCmdLineArgs::parsedArgs();
+ TDECmdLineArgs::init(argc, argv, &about);
+ TDECmdLineArgs::addCmdLineOptions(op);
+ args = TDECmdLineArgs::parsedArgs();
- KApplication i;
+ TDEApplication i;
KNS::DownloadDialog d;
if(args->isSet("type")) d.setType(args->getOption("type"));
diff --git a/knewstuff/khotnewstuffrc b/knewstuff/tdehotnewstuffrc
index 737ad61c2..737ad61c2 100644
--- a/knewstuff/khotnewstuffrc
+++ b/knewstuff/tdehotnewstuffrc
diff --git a/knewstuff/testnewstuff.cpp b/knewstuff/testnewstuff.cpp
index b0c380c68..3494c5230 100644
--- a/knewstuff/testnewstuff.cpp
+++ b/knewstuff/testnewstuff.cpp
@@ -24,11 +24,11 @@
#include <tqfile.h>
#include <tqtextstream.h>
-#include <kaboutdata.h>
-#include <kapplication.h>
+#include <tdeaboutdata.h>
+#include <tdeapplication.h>
#include <kdebug.h>
-#include <klocale.h>
-#include <kcmdlineargs.h>
+#include <tdelocale.h>
+#include <tdecmdlineargs.h>
#include <kprocess.h>
#include <kdialog.h>
@@ -54,9 +54,9 @@ bool TestNewStuff::install( const TQString &fileName )
bool TestNewStuff::createUploadFile( const TQString &fileName )
{
- KProcess p;
+ TDEProcess p;
p << "touch" << fileName;
- p.start(KProcess::Block);
+ p.start(TDEProcess::Block);
kdDebug() << "TestNewStuff::createUploadFile(): " << fileName << endl;
return true;
}
@@ -107,10 +107,10 @@ void MyWidget::upload()
int main(int argc,char **argv)
{
- KAboutData aboutData("knewstufftest","KNewStuff Test","0.1");
- KCmdLineArgs::init(argc,argv,&aboutData);
+ TDEAboutData aboutData("knewstufftest","KNewStuff Test","0.1");
+ TDECmdLineArgs::init(argc,argv,&aboutData);
- KApplication app;
+ TDEApplication app;
MyWidget wid;
app.setMainWidget( &wid );
diff --git a/knewstuff/testnewstuff.h b/knewstuff/testnewstuff.h
index 3af0d68cc..a7bc5710f 100644
--- a/knewstuff/testnewstuff.h
+++ b/knewstuff/testnewstuff.h
@@ -25,7 +25,7 @@
#include <tqpushbutton.h>
-#include <kapplication.h>
+#include <tdeapplication.h>
#include <kdebug.h>
#include "knewstuff.h"
diff --git a/knewstuff/uploaddialog.cpp b/knewstuff/uploaddialog.cpp
index cecc67e32..f4b3dd50e 100644
--- a/knewstuff/uploaddialog.cpp
+++ b/knewstuff/uploaddialog.cpp
@@ -26,13 +26,13 @@
#include <tqstring.h>
#include <ktextedit.h>
-#include <klistview.h>
-#include <klocale.h>
+#include <tdelistview.h>
+#include <tdelocale.h>
#include <kdebug.h>
#include <kurlrequester.h>
-#include <kmessagebox.h>
-#include <kconfig.h>
-#include <kapplication.h>
+#include <tdemessagebox.h>
+#include <tdeconfig.h>
+#include <tdeapplication.h>
#include <kuser.h>
#include "engine.h"
@@ -94,7 +94,7 @@ UploadDialog::UploadDialog( Engine *engine, TQWidget *parent ) :
topLayout->addWidget( languageLabel, 6, 0 );
mLanguageCombo = new TQComboBox( topPage );
topLayout->addWidget( mLanguageCombo, 6, 1 );
- mLanguageCombo->insertStringList( KGlobal::locale()->languageList() );
+ mLanguageCombo->insertStringList( TDEGlobal::locale()->languageList() );
TQLabel *previewLabel = new TQLabel( i18n("Preview URL:"), topPage );
topLayout->addWidget( previewLabel, 7, 0 );
@@ -136,7 +136,7 @@ void UploadDialog::slotOk()
entry->setSummary( mSummaryEdit->text(), mLanguageCombo->currentText() );
if ( mPayloadUrl.isValid() ) {
- KConfig *conf = kapp->config();
+ TDEConfig *conf = kapp->config();
conf->setGroup( TQString("KNewStuffUpload:%1").arg(mPayloadUrl.fileName()) );
conf->writeEntry("name", mNameEdit->text());
conf->writeEntry("author", mAuthorEdit->text());
@@ -164,7 +164,7 @@ void UploadDialog::setPayloadFile( const TQString &payloadFile )
{
mPayloadUrl = payloadFile;
- KConfig *conf = kapp->config();
+ TDEConfig *conf = kapp->config();
conf->setGroup( TQString("KNewStuffUpload:%1").arg(mPayloadUrl.fileName()) );
TQString name = conf->readEntry("name");
TQString author = conf->readEntry("author");