summaryrefslogtreecommitdiffstats
path: root/knewstuff
diff options
context:
space:
mode:
Diffstat (limited to 'knewstuff')
-rw-r--r--knewstuff/downloaddialog.cpp264
-rw-r--r--knewstuff/downloaddialog.h58
-rw-r--r--knewstuff/engine.cpp94
-rw-r--r--knewstuff/engine.h38
-rw-r--r--knewstuff/entry.cpp136
-rw-r--r--knewstuff/entry.h94
-rw-r--r--knewstuff/ghns.cpp22
-rw-r--r--knewstuff/ghns.h2
-rw-r--r--knewstuff/knewstuff.cpp16
-rw-r--r--knewstuff/knewstuff.h22
-rw-r--r--knewstuff/knewstuffbutton.cpp18
-rw-r--r--knewstuff/knewstuffbutton.h20
-rw-r--r--knewstuff/knewstuffgeneric.cpp42
-rw-r--r--knewstuff/knewstuffgeneric.h12
-rw-r--r--knewstuff/knewstuffsecure.cpp46
-rw-r--r--knewstuff/knewstuffsecure.h18
-rw-r--r--knewstuff/provider.cpp64
-rw-r--r--knewstuff/provider.h36
-rw-r--r--knewstuff/providerdialog.cpp14
-rw-r--r--knewstuff/providerdialog.h2
-rw-r--r--knewstuff/security.cpp70
-rw-r--r--knewstuff/security.h20
-rw-r--r--knewstuff/testnewstuff.cpp28
-rw-r--r--knewstuff/testnewstuff.h6
-rw-r--r--knewstuff/uploaddialog.cpp78
-rw-r--r--knewstuff/uploaddialog.h24
26 files changed, 622 insertions, 622 deletions
diff --git a/knewstuff/downloaddialog.cpp b/knewstuff/downloaddialog.cpp
index 51028dfab..4e1d298c8 100644
--- a/knewstuff/downloaddialog.cpp
+++ b/knewstuff/downloaddialog.cpp
@@ -36,39 +36,39 @@
#include <knewstuff/knewstuffgeneric.h>
#include <knewstuff/engine.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
-#include <qdom.h>
-#include <qlabel.h>
-#include <qtextbrowser.h>
-#include <qtabwidget.h>
-#include <qtimer.h> // hack
+#include <tqlayout.h>
+#include <tqpushbutton.h>
+#include <tqdom.h>
+#include <tqlabel.h>
+#include <tqtextbrowser.h>
+#include <tqtabwidget.h>
+#include <tqtimer.h> // hack
using namespace KNS;
struct DownloadDialog::Private
{
- QString m_providerlist;
- QWidget *m_page;
+ TQString m_providerlist;
+ TQWidget *m_page;
KListView *m_lvtmp_r, *m_lvtmp_d, *m_lvtmp_l;
- QPtrList<Entry> m_installlist;
- QMap<KIO::Job*, Provider*> m_variantjobs;
- QMap<KIO::Job*, QStringList> m_variants;
- QMap<Provider*, Provider*> m_newproviders;
+ TQPtrList<Entry> m_installlist;
+ TQMap<KIO::Job*, Provider*> m_variantjobs;
+ TQMap<KIO::Job*, TQStringList> m_variants;
+ TQMap<Provider*, Provider*> m_newproviders;
};
class NumSortListViewItem : public KListViewItem
{
public:
- NumSortListViewItem( QListView * parent, QString label1, QString label2 = QString::null, QString label3 = QString::null, QString label4 = QString::null, QString label5 = QString::null, QString label6 = QString::null, QString label7 = QString::null, QString label8 = QString::null ) :
+ 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 )
{
}
- QString key(int col, bool asc) const {
+ TQString key(int col, bool asc) const {
if (col == 2)
{
- QString s;
+ TQString s;
s.sprintf("%08d", text(col).toInt());
return s;
}
@@ -79,16 +79,16 @@ class NumSortListViewItem : public KListViewItem
class DateSortListViewItem : public KListViewItem
{
public:
- DateSortListViewItem( QListView * parent, QString label1, QString label2 = QString::null, QString label3 = QString::null, QString label4 = QString::null, QString label5 = QString::null, QString label6 = QString::null, QString label7 = QString::null, QString label8 = QString::null ) :
+ 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 )
{
}
- QString key(int col, bool asc) const {
+ TQString key(int col, bool asc) const {
if (col == 2)
{
- QString s;
- QDate date = KGlobal::locale()->readDate(text(col));
+ TQString s;
+ TQDate date = KGlobal::locale()->readDate(text(col));
s.sprintf("%08d", date.year() * 366 + date.dayOfYear());
return s;
}
@@ -97,21 +97,21 @@ class DateSortListViewItem : public KListViewItem
};
// BEGIN deprecated for KDE 4
-DownloadDialog::DownloadDialog(Engine *engine, QWidget *)
+DownloadDialog::DownloadDialog(Engine *engine, TQWidget *)
: KDialogBase(KDialogBase::IconList, i18n("Get Hot New Stuff"),
KDialogBase::Close, KDialogBase::Close)
{
init(engine);
}
-DownloadDialog::DownloadDialog(QWidget *)
+DownloadDialog::DownloadDialog(TQWidget *)
: KDialogBase(KDialogBase::IconList, i18n("Get Hot New Stuff"),
KDialogBase::Close, KDialogBase::Close)
{
init(0);
}
-void DownloadDialog::open(QString type)
+void DownloadDialog::open(TQString type)
{
DownloadDialog d;
d.setType(type);
@@ -120,14 +120,14 @@ void DownloadDialog::open(QString type)
}
// END deprecated for KDE 4
-DownloadDialog::DownloadDialog(Engine *engine, QWidget *, const QString& caption)
+DownloadDialog::DownloadDialog(Engine *engine, TQWidget *, const TQString& caption)
: KDialogBase(KDialogBase::IconList, (caption.isNull() ? i18n("Get Hot New Stuff") : caption),
KDialogBase::Close, KDialogBase::Close)
{
init(engine);
}
-DownloadDialog::DownloadDialog(QWidget *, const QString& caption)
+DownloadDialog::DownloadDialog(TQWidget *, const TQString& caption)
: KDialogBase(KDialogBase::IconList, (caption.isNull() ? i18n("Get Hot New Stuff") : caption),
KDialogBase::Close, KDialogBase::Close)
{
@@ -142,12 +142,12 @@ void DownloadDialog::init(Engine *engine)
m_engine = engine;
d->m_page = NULL;
- connect(this, SIGNAL(aboutToShowPage(QWidget*)), SLOT(slotPage(QWidget*)));
+ connect(this, TQT_SIGNAL(aboutToShowPage(TQWidget*)), TQT_SLOT(slotPage(TQWidget*)));
if(!engine)
{
m_loader = new ProviderLoader(this);
- connect(m_loader, SIGNAL(providersLoaded(Provider::List*)), SLOT(slotProviders(Provider::List*)));
+ connect(m_loader, TQT_SIGNAL(providersLoaded(Provider::List*)), TQT_SLOT(slotProviders(Provider::List*)));
}
m_entries.setAutoDelete(true);
@@ -155,9 +155,9 @@ void DownloadDialog::init(Engine *engine)
DownloadDialog::~DownloadDialog()
{
- for (QMap<QWidget *, QValueList<QPushButton *>* >::const_iterator it = m_buttons.constBegin(); it != m_buttons.constEnd(); ++it)
+ for (TQMap<TQWidget *, TQValueList<TQPushButton *>* >::const_iterator it = m_buttons.constBegin(); it != m_buttons.constEnd(); ++it)
delete it.data();
- for (QMap<QWidget *, QValueList<KListView *>* >::const_iterator it = m_map.constBegin(); it != m_map.constEnd(); ++it)
+ for (TQMap<TQWidget *, TQValueList<KListView *>* >::const_iterator it = m_map.constBegin(); it != m_map.constEnd(); ++it)
delete it.data();
delete d;
}
@@ -167,18 +167,18 @@ void DownloadDialog::load()
m_loader->load(m_filter, d->m_providerlist);
}
-void DownloadDialog::load(QString providerList)
+void DownloadDialog::load(TQString providerList)
{
m_loader->load(m_filter, providerList);
}
void DownloadDialog::clear()
{
- QMap<QWidget*, QValueList<KListView*>* >::Iterator it;
- QMap<QWidget*, QValueList<KListView*>* >::Iterator end(m_map.end());
+ TQMap<TQWidget*, TQValueList<KListView*>* >::Iterator it;
+ TQMap<TQWidget*, TQValueList<KListView*>* >::Iterator end(m_map.end());
for(it = m_map.begin(); it != end; ++it)
{
- QValueList<KListView*> *v = it.data();
+ TQValueList<KListView*> *v = it.data();
kdDebug() << "clear listviews in " << v << endl;
if(v)
{
@@ -197,7 +197,7 @@ void DownloadDialog::clear()
void DownloadDialog::slotProviders(Provider::List *list)
{
Provider *p;
- /*QFrame *frame;*/
+ /*TQFrame *frame;*/
for(p = list->first(); p; p = list->next())
{
@@ -214,18 +214,18 @@ void DownloadDialog::slotProviders(Provider::List *list)
void DownloadDialog::addProvider(Provider *p)
{
- QFrame *frame;
- QTabWidget *ctl;
- QWidget *w_d, *w_r, *w_l;
- QWidget *w2;
- QTextBrowser *rt;
- QString tmp;
+ TQFrame *frame;
+ TQTabWidget *ctl;
+ TQWidget *w_d, *w_r, *w_l;
+ TQWidget *w2;
+ TQTextBrowser *rt;
+ TQString tmp;
int ret;
- QPixmap pix;
+ TQPixmap pix;
if(m_map.count() == 0)
{
- frame = addPage(i18n("Welcome"), i18n("Welcome"), QPixmap(""));
+ frame = addPage(i18n("Welcome"), i18n("Welcome"), TQPixmap(""));
delete frame;
}
@@ -238,7 +238,7 @@ void DownloadDialog::addProvider(Provider *p)
if(!p->icon().protocol().isEmpty())
{
ret = KIO::NetAccess::download(p->icon(), tmp, this);
- if(ret) pix = QPixmap(tmp);
+ if(ret) pix = TQPixmap(tmp);
}
else
{
@@ -250,20 +250,20 @@ void DownloadDialog::addProvider(Provider *p)
frame = addPage(p->name(), p->name(), pix);
m_frame = frame;
- w2 = new QWidget(frame);
- w_d = new QWidget(frame);
- w_r = new QWidget(frame);
- w_l = new QWidget(frame);
+ w2 = new TQWidget(frame);
+ w_d = new TQWidget(frame);
+ w_r = new TQWidget(frame);
+ w_l = new TQWidget(frame);
- ctl = new QTabWidget(frame);
+ ctl = new TQTabWidget(frame);
ctl->addTab(w_r, i18n("Highest Rated"));
ctl->addTab(w_d, i18n("Most Downloads"));
ctl->addTab(w_l, i18n("Latest"));
m_curtab = 0;
- connect(ctl, SIGNAL(currentChanged(QWidget *)), SLOT(slotTab()));
+ connect(ctl, TQT_SIGNAL(currentChanged(TQWidget *)), TQT_SLOT(slotTab()));
- QHBoxLayout *box = new QHBoxLayout(frame);
+ TQHBoxLayout *box = new TQHBoxLayout(frame);
box->add(ctl);
d->m_lvtmp_r = new KListView(w_r);
@@ -284,42 +284,42 @@ void DownloadDialog::addProvider(Provider *p)
d->m_lvtmp_l->addColumn(i18n("Release Date"));
d->m_lvtmp_l->setSorting(2, false);
- connect(d->m_lvtmp_r, SIGNAL(clicked(QListViewItem*)), SLOT(slotSelected()));
- connect(d->m_lvtmp_d, SIGNAL(clicked(QListViewItem*)), SLOT(slotSelected()));
- connect(d->m_lvtmp_l, SIGNAL(clicked(QListViewItem*)), SLOT(slotSelected()));
+ connect(d->m_lvtmp_r, TQT_SIGNAL(clicked(TQListViewItem*)), TQT_SLOT(slotSelected()));
+ connect(d->m_lvtmp_d, TQT_SIGNAL(clicked(TQListViewItem*)), TQT_SLOT(slotSelected()));
+ connect(d->m_lvtmp_l, TQT_SIGNAL(clicked(TQListViewItem*)), TQT_SLOT(slotSelected()));
- rt = new QTextBrowser(frame);
+ rt = new TQTextBrowser(frame);
rt->setMinimumWidth(150);
- QPushButton *in = new QPushButton(i18n("Install"), frame);
- QPushButton *de = new QPushButton(i18n("Details"), frame);
+ TQPushButton *in = new TQPushButton(i18n("Install"), frame);
+ TQPushButton *de = new TQPushButton(i18n("Details"), frame);
in->setEnabled(false);
de->setEnabled(false);
box->addSpacing(spacingHint());
- QVBoxLayout *vbox = new QVBoxLayout(box);
+ TQVBoxLayout *vbox = new TQVBoxLayout(box);
vbox->add(rt);
vbox->addSpacing(spacingHint());
vbox->add(de);
vbox->add(in);
- connect(rt, SIGNAL(linkClicked(const QString&)), SLOT(slotEmail(const QString&)));
+ connect(rt, TQT_SIGNAL(linkClicked(const TQString&)), TQT_SLOT(slotEmail(const TQString&)));
- connect(in, SIGNAL(clicked()), SLOT(slotInstall()));
- connect(de, SIGNAL(clicked()), SLOT(slotDetails()));
+ connect(in, TQT_SIGNAL(clicked()), TQT_SLOT(slotInstall()));
+ connect(de, TQT_SIGNAL(clicked()), TQT_SLOT(slotDetails()));
- QVBoxLayout *box2 = new QVBoxLayout(w_r);
+ TQVBoxLayout *box2 = new TQVBoxLayout(w_r);
box2->add(d->m_lvtmp_r);
- QVBoxLayout *box3 = new QVBoxLayout(w_d);
+ TQVBoxLayout *box3 = new TQVBoxLayout(w_d);
box3->add(d->m_lvtmp_d);
- QVBoxLayout *box4 = new QVBoxLayout(w_l);
+ TQVBoxLayout *box4 = new TQVBoxLayout(w_l);
box4->add(d->m_lvtmp_l);
- QValueList<KListView*> *v = new QValueList<KListView*>;
+ TQValueList<KListView*> *v = new TQValueList<KListView*>;
*v << d->m_lvtmp_r << d->m_lvtmp_d << d->m_lvtmp_l;
m_map[frame] = v;
m_rts[frame] = rt;
- QValueList<QPushButton*> *vb = new QValueList<QPushButton*>;
+ TQValueList<TQPushButton*> *vb = new TQValueList<TQPushButton*>;
*vb << in << de;
m_buttons[frame] = vb;
m_providers[frame] = p;
@@ -328,13 +328,13 @@ void DownloadDialog::addProvider(Provider *p)
if(m_engine) slotPage(frame);
- QTimer::singleShot(100, this, SLOT(slotFinish()));
+ TQTimer::singleShot(100, this, TQT_SLOT(slotFinish()));
}
void DownloadDialog::slotResult(KIO::Job *job)
{
- QDomDocument dom;
- QDomElement knewstuff;
+ TQDomDocument dom;
+ TQDomElement knewstuff;
kdDebug() << "got data: " << m_data[job] << endl;
@@ -343,9 +343,9 @@ void DownloadDialog::slotResult(KIO::Job *job)
dom.setContent(m_data[job]);
knewstuff = dom.documentElement();
- for(QDomNode pn = knewstuff.firstChild(); !pn.isNull(); pn = pn.nextSibling())
+ for(TQDomNode pn = knewstuff.firstChild(); !pn.isNull(); pn = pn.nextSibling())
{
- QDomElement stuff = pn.toElement();
+ TQDomElement stuff = pn.toElement();
kdDebug() << "element: " << stuff.tagName() << endl;
@@ -388,18 +388,18 @@ void DownloadDialog::slotResult(KIO::Job *job)
int DownloadDialog::installStatus(Entry *entry)
{
- QDate date;
- QString datestring;
+ TQDate date;
+ TQString datestring;
int installed;
- QString lang = KGlobal::locale()->language();
+ TQString lang = KGlobal::locale()->language();
kapp->config()->setGroup("KNewStuffStatus");
datestring = kapp->config()->readEntry(entry->name(lang));
if(datestring.isNull()) installed = 0;
else
{
- date = QDate::fromString(datestring, Qt::ISODate);
+ date = TQDate::fromString(datestring, Qt::ISODate);
if(!date.isValid()) installed = 0;
else if(date < entry->releaseDate()) installed = -1;
else installed = 1;
@@ -408,29 +408,29 @@ int DownloadDialog::installStatus(Entry *entry)
return installed;
}
-void DownloadDialog::addEntry(Entry *entry, const QStringList& variants)
+void DownloadDialog::addEntry(Entry *entry, const TQStringList& variants)
{
- QPixmap pix;
+ TQPixmap pix;
int installed;
installed = installStatus(entry);
if(installed > 0) pix = KGlobal::iconLoader()->loadIcon("ok", KIcon::Small);
else if(installed < 0) pix = KGlobal::iconLoader()->loadIcon("history", KIcon::Small);
- else pix = QPixmap();
+ else pix = TQPixmap();
- QString lang = KGlobal::locale()->language();
+ TQString lang = KGlobal::locale()->language();
if(variants.contains("score"))
{
KListViewItem *tmp_r = new NumSortListViewItem(lv_r,
- entry->name(lang), entry->version(), QString("%1").arg(entry->rating()));
+ 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,
- entry->name(lang), entry->version(), QString("%1").arg(entry->downloads()));
+ entry->name(lang), entry->version(), TQString("%1").arg(entry->downloads()));
tmp_d->setPixmap(0, pix);
}
if(variants.contains("latest"))
@@ -447,7 +447,7 @@ void DownloadDialog::addEntry(Entry *entry, const QStringList& variants)
void DownloadDialog::addEntry(Entry *entry)
{
- QStringList variants;
+ TQStringList variants;
variants << "score";
variants << "downloads";
@@ -459,10 +459,10 @@ void DownloadDialog::addEntry(Entry *entry)
kdDebug() << "added entry " << entry->name() << endl;
}
-void DownloadDialog::slotData(KIO::Job *job, const QByteArray &a)
+void DownloadDialog::slotData(KIO::Job *job, const TQByteArray &a)
{
- QCString tmp(a, a.size() + 1);
- m_data[job].append(QString::fromUtf8(tmp));
+ TQCString tmp(a, a.size() + 1);
+ m_data[job].append(TQString::fromUtf8(tmp));
}
void DownloadDialog::slotDetails()
@@ -470,9 +470,9 @@ void DownloadDialog::slotDetails()
Entry *e = getEntry();
if(!e) return;
- QString lang = KGlobal::locale()->language();
+ TQString lang = KGlobal::locale()->language();
- QString info = i18n
+ TQString info = i18n
(
"Name: %1\n"
"Author: %2\n"
@@ -505,7 +505,7 @@ void DownloadDialog::slotDetails()
KMessageBox::information(this, info, i18n("Details"));
}
-QListViewItem *DownloadDialog::currentEntryItem()
+TQListViewItem *DownloadDialog::currentEntryItem()
{
if((m_curtab == 0) && (lv_r->selectedItem())) return lv_r->selectedItem();
if((m_curtab == 1) && (lv_d->selectedItem())) return lv_d->selectedItem();
@@ -540,7 +540,7 @@ void DownloadDialog::slotInstall()
KURL dest = KURL(m_s->downloadDestination(e));
KIO::FileCopyJob *job = KIO::file_copy(source, dest, -1, true);
- connect(job, SIGNAL(result(KIO::Job*)), SLOT(slotInstalled(KIO::Job*)));
+ connect(job, TQT_SIGNAL(result(KIO::Job*)), TQT_SLOT(slotInstalled(KIO::Job*)));
}
}
@@ -550,15 +550,15 @@ void DownloadDialog::install(Entry *e)
kapp->config()->writeEntry(m_entryname, e->releaseDate().toString(Qt::ISODate));
kapp->config()->sync();
- QPixmap pix = KGlobal::iconLoader()->loadIcon("ok", KIcon::Small);
+ TQPixmap pix = KGlobal::iconLoader()->loadIcon("ok", KIcon::Small);
- QString lang = KGlobal::locale()->language();
+ TQString lang = KGlobal::locale()->language();
if(m_entryitem)
{
m_entryitem->setPixmap(0, pix);
- QListViewItem *item;
+ TQListViewItem *item;
item = lv_r->findItem(e->name(lang), 0);
if(item) item->setPixmap(0, pix);
item = lv_d->findItem(e->name(lang), 0);
@@ -569,7 +569,7 @@ void DownloadDialog::install(Entry *e)
if(currentEntryItem() == m_entryitem)
{
- QPushButton *in;
+ TQPushButton *in;
in = *(m_buttons[d->m_page]->at(0));
if(in) in->setEnabled(false);
}
@@ -609,7 +609,7 @@ void DownloadDialog::slotInstalled(KIO::Job *job)
void DownloadDialog::slotTab()
{
- int tab = static_cast<const QTabWidget *>(sender())->currentPageIndex();
+ int tab = static_cast<const TQTabWidget *>(sender())->currentPageIndex();
kdDebug() << "switch tab to: " << tab << endl;
Entry *eold = getEntry();
@@ -624,7 +624,7 @@ void DownloadDialog::slotTab()
}
else
{
- QPushButton *de, *in;
+ TQPushButton *de, *in;
in = *(m_buttons[d->m_page]->at(0));
de = *(m_buttons[d->m_page]->at(1));
@@ -637,17 +637,17 @@ void DownloadDialog::slotTab()
void DownloadDialog::slotSelected()
{
- QString tmp;
+ TQString tmp;
bool enabled;
Entry *e = getEntry();
- QString lang = KGlobal::locale()->language();
+ TQString lang = KGlobal::locale()->language();
bool ret;
if(e)
{
- QString lang = KGlobal::locale()->language();
+ TQString lang = KGlobal::locale()->language();
- QListViewItem *item;
+ TQListViewItem *item;
if(m_curtab != 0)
{
lv_r->clearSelection();
@@ -676,27 +676,27 @@ void DownloadDialog::slotSelected()
ret = KIO::NetAccess::download(e->preview(lang), tmp, this);
}
- QString desc = QString("<b>%1</b><br>").arg(e->name(lang));
+ TQString desc = TQString("<b>%1</b><br>").arg(e->name(lang));
if(!e->authorEmail().isNull())
{
- desc += QString("<a href='mailto:" + e->authorEmail() + "'>" + e->author() + "</a>");
+ desc += TQString("<a href='mailto:" + e->authorEmail() + "'>" + e->author() + "</a>");
}
else
{
- desc += QString("%1").arg(e->author());
+ desc += TQString("%1").arg(e->author());
}
- desc += QString("<br>%1").arg(KGlobal::locale()->formatDate(e->releaseDate()));
- desc += QString("<br><br>");
+ desc += TQString("<br>%1").arg(KGlobal::locale()->formatDate(e->releaseDate()));
+ desc += TQString("<br><br>");
if(ret)
{
- desc += QString("<img src='%1'>").arg(tmp);
+ desc += TQString("<img src='%1'>").arg(tmp);
}
else
{
desc += i18n("Preview not available.");
}
- desc += QString("<br><i>%1</i>").arg(e->summary(lang));
- desc += QString("<br>(%1)").arg(e->license());
+ desc += TQString("<br><i>%1</i>").arg(e->summary(lang));
+ desc += TQString("<br>(%1)").arg(e->license());
m_rt->clear();
m_rt->setText(desc);
@@ -704,7 +704,7 @@ void DownloadDialog::slotSelected()
if(installStatus(e) == 1) enabled = false;
else enabled = true;
- QPushButton *de, *in;
+ TQPushButton *de, *in;
in = *(m_buttons[d->m_page]->at(0));
de = *(m_buttons[d->m_page]->at(1));
if(in) in->setEnabled(enabled);
@@ -712,23 +712,23 @@ void DownloadDialog::slotSelected()
}
}
-void DownloadDialog::slotEmail(const QString& link)
+void DownloadDialog::slotEmail(const TQString& link)
{
kdDebug() << "EMAIL: " << link << endl;
kapp->invokeMailer(link);
- slotSelected(); // QTextBrowser oddity workaround as it cannot handle mailto: URLs
+ slotSelected(); // TQTextBrowser oddity workaround as it cannot handle mailto: URLs
}
Entry *DownloadDialog::getEntry()
{
- QListViewItem *entryItem = currentEntryItem();
+ TQListViewItem *entryItem = currentEntryItem();
if(!entryItem)
return 0;
- QString entryName = entryItem->text(0);
+ TQString entryName = entryItem->text(0);
- QString lang = KGlobal::locale()->language();
+ TQString lang = KGlobal::locale()->language();
for(Entry *e = m_entries.first(); e; e = m_entries.next())
if(e->name(lang) == entryName)
@@ -737,7 +737,7 @@ Entry *DownloadDialog::getEntry()
return 0;
}
-void DownloadDialog::slotPage(QWidget *w)
+void DownloadDialog::slotPage(TQWidget *w)
{
Provider *p;
@@ -770,7 +770,7 @@ void DownloadDialog::slotPage(QWidget *w)
void DownloadDialog::loadProvider(Provider *p)
{
- QMap<KIO::Job*, Provider*>::Iterator it;
+ TQMap<KIO::Job*, Provider*>::Iterator it;
for(it = d->m_variantjobs.begin(); it != d->m_variantjobs.end(); it++)
{
@@ -782,21 +782,21 @@ void DownloadDialog::loadProvider(Provider *p)
}
}
- QStringList variants;
+ TQStringList variants;
variants << "score";
variants << "downloads";
variants << "latest";
// Optimise URLs so each unique URL only gets fetched once
- QMap<QString, QStringList> urls;
+ TQMap<TQString, TQStringList> urls;
- for(QStringList::Iterator it = variants.begin(); it != variants.end(); it++)
+ for(TQStringList::Iterator it = variants.begin(); it != variants.end(); it++)
{
- QString url = p->downloadUrlVariant((*it)).url();
+ TQString url = p->downloadUrlVariant((*it)).url();
if(!urls.contains(url))
{
- urls[url] = QStringList();
+ urls[url] = TQStringList();
}
urls[url] << (*it);
@@ -805,10 +805,10 @@ void DownloadDialog::loadProvider(Provider *p)
// Now fetch the URLs while keeping the variant list for each attached
- for(QMap<QString, QStringList>::Iterator it = urls.begin(); it != urls.end(); it++)
+ for(TQMap<TQString, TQStringList>::Iterator it = urls.begin(); it != urls.end(); it++)
{
- QString url = it.key();
- QStringList urlvariants = it.data();
+ TQString url = it.key();
+ TQStringList urlvariants = it.data();
KIO::TransferJob *variantjob = KIO::get(url);
d->m_newproviders[p] = p;
@@ -816,9 +816,9 @@ void DownloadDialog::loadProvider(Provider *p)
d->m_variants[variantjob] = urlvariants;
m_data[variantjob] = "";
- connect(variantjob, SIGNAL(result(KIO::Job*)), SLOT(slotResult(KIO::Job*)));
- connect(variantjob, SIGNAL(data(KIO::Job*, const QByteArray&)),
- SLOT(slotData(KIO::Job*, const QByteArray&)));
+ 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&)));
}
if(variants.count() == 0) return;
@@ -835,17 +835,17 @@ void DownloadDialog::loadProvider(Provider *p)
//m_jobs[job] = p; // not used anymore due to variants
m_data[job] = "";
- connect(job, SIGNAL(result(KIO::Job*)), SLOT(slotResult(KIO::Job*)));
- connect(job, SIGNAL(data(KIO::Job*, const QByteArray&)),
- SLOT(slotData(KIO::Job*, const QByteArray&)));
+ 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&)));
}
-void DownloadDialog::setType(QString type)
+void DownloadDialog::setType(TQString type)
{
m_filter = type;
}
-void DownloadDialog::setProviderList(const QString& providerList)
+void DownloadDialog::setProviderList(const TQString& providerList)
{
d->m_providerlist = providerList;
}
@@ -858,7 +858,7 @@ void DownloadDialog::slotApply()
{
}
-void DownloadDialog::open(const QString& type, const QString& caption)
+void DownloadDialog::open(const TQString& type, const TQString& caption)
{
DownloadDialog d(0, caption);
d.setType(type);
@@ -872,7 +872,7 @@ void DownloadDialog::slotFinish()
//updateBackground();
}
-QPtrList<Entry> DownloadDialog::installedEntries()
+TQPtrList<Entry> DownloadDialog::installedEntries()
{
return d->m_installlist;
}
diff --git a/knewstuff/downloaddialog.h b/knewstuff/downloaddialog.h
index dd9d6dae4..de5babe33 100644
--- a/knewstuff/downloaddialog.h
+++ b/knewstuff/downloaddialog.h
@@ -67,7 +67,7 @@ class KDE_EXPORT DownloadDialog : public KDialogBase
@param parent the parent window
@param caption the dialog caption
*/
- DownloadDialog(Engine *engine, QWidget *parent, const QString& caption);
+ DownloadDialog(Engine *engine, TQWidget *parent, const TQString& caption);
/**
Alternative constructor.
@@ -76,7 +76,7 @@ class KDE_EXPORT DownloadDialog : public KDialogBase
@param parent the parent window
@param caption the dialog caption
*/
- DownloadDialog(QWidget *parent, const QString& caption);
+ DownloadDialog(TQWidget *parent, const TQString& caption);
/**
Destructor.
@@ -88,8 +88,8 @@ class KDE_EXPORT DownloadDialog : public KDialogBase
@param type a Hotstuff data type such as "korganizer/calendar"
*/
- void setType(QString type);
- // ### KDE 4.0: use const QString&
+ void setType(TQString type);
+ // ### KDE 4.0: use const TQString&
/**
Fetches descriptions of all available data, optionally considering
@@ -105,7 +105,7 @@ class KDE_EXPORT DownloadDialog : public KDialogBase
@since 3.4
*/
- void setProviderList(const QString& providerList);
+ void setProviderList(const TQString& providerList);
/**
Fetches descriptions of all available data, optionally considering
@@ -115,7 +115,7 @@ class KDE_EXPORT DownloadDialog : public KDialogBase
we first try the ProvidersUrl from KGlobal::config, then we
fall back to a hardcoded value.
*/
- void load(QString providerList); // KDE4: merge with load() above
+ void load(TQString providerList); // KDE4: merge with load() above
/**
Adds another provider to the download dialog.
@@ -141,7 +141,7 @@ class KDE_EXPORT DownloadDialog : public KDialogBase
@param entry a Hotstuff data entry to be added
@param variants all variants this entry is intended for
*/
- void addEntry(Entry *entry, const QStringList& variants);
+ void addEntry(Entry *entry, const TQStringList& variants);
/**
Clears the entry list of the current provider.
@@ -156,7 +156,7 @@ class KDE_EXPORT DownloadDialog : public KDialogBase
dialog should create an engine on its own
@param parent the parent window
*/
- DownloadDialog(Engine *engine, QWidget *parent = 0);
+ DownloadDialog(Engine *engine, TQWidget *parent = 0);
// ### KDE 4.0: remove and make caption/parent argument optional
/**
@@ -165,7 +165,7 @@ class KDE_EXPORT DownloadDialog : public KDialogBase
@param parent the parent window
*/
- DownloadDialog(QWidget *parent = 0);
+ DownloadDialog(TQWidget *parent = 0);
// ### KDE 4.0: remove and make caption/parent argument optional
/**
@@ -177,7 +177,7 @@ class KDE_EXPORT DownloadDialog : public KDialogBase
@param type a data type such as "korganizer/calendar"
@param caption the dialog caption
*/
- static void open(const QString& type, const QString& caption);
+ static void open(const TQString& type, const TQString& caption);
/**
Opens the download dialog.
@@ -186,16 +186,16 @@ class KDE_EXPORT DownloadDialog : public KDialogBase
@see load()
@param type a data type such as "korganizer/calendar"
- @deprecated use open( const QString& type, const QString& caption );
+ @deprecated use open( const TQString& type, const TQString& caption );
*/
- static void open(QString type) KDE_DEPRECATED; // ### KDE 4.0: remove and make caption/parent argument optional
+ static void open(TQString type) KDE_DEPRECATED; // ### KDE 4.0: remove and make caption/parent argument optional
/**
Returns the list of installed data entries.
@return list of data entries which have been installed
*/
- QPtrList<Entry> installedEntries();
+ TQPtrList<Entry> installedEntries();
// ### KDE 4.0: the open() method should return this
public slots:
@@ -212,15 +212,15 @@ class KDE_EXPORT DownloadDialog : public KDialogBase
private slots:
void slotResult(KIO::Job *job);
- void slotData(KIO::Job *job, const QByteArray &a);
+ void slotData(KIO::Job *job, const TQByteArray &a);
void slotInstall();
void slotDetails();
void slotInstalled(KIO::Job *job);
void slotTab();
void slotSelected();
- void slotPage(QWidget *w);
+ void slotPage(TQWidget *w);
void slotFinish();
- void slotEmail(const QString& link);
+ void slotEmail(const TQString& link);
private:
void init(Engine *e);
@@ -228,25 +228,25 @@ class KDE_EXPORT DownloadDialog : public KDialogBase
void loadProvider(Provider *p);
void install(Entry *e);
int installStatus(Entry *e);
- QListViewItem *currentEntryItem();
+ TQListViewItem *currentEntryItem();
ProviderLoader *m_loader;
- QString m_entryname;
+ TQString m_entryname;
KListView *lv_r, *lv_d, *lv_l;
- QTextBrowser *m_rt;
- QFrame *m_frame;
- QListViewItem *m_entryitem;
- QPtrList<Entry> m_entries;
+ TQTextBrowser *m_rt;
+ TQFrame *m_frame;
+ TQListViewItem *m_entryitem;
+ TQPtrList<Entry> m_entries;
Entry *m_entry;
KNewStuffGeneric *m_s;
int m_curtab;
- QMap<QWidget*, QValueList<KListView*>* > m_map;
- QMap<QWidget*, Provider*> m_providers;
- QMap<QWidget*, QTextBrowser*> m_rts;
- QMap<QWidget*, QValueList<QPushButton*>* > m_buttons;
- QMap<KIO::Job*, Provider*> m_jobs;
- QMap<KIO::Job*, QString> m_data;
- QString m_filter;
+ TQMap<TQWidget*, TQValueList<KListView*>* > 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;
+ TQString m_filter;
Engine *m_engine;
Private *d;
};
diff --git a/knewstuff/engine.cpp b/knewstuff/engine.cpp
index 4feda926c..799ce9898 100644
--- a/knewstuff/engine.cpp
+++ b/knewstuff/engine.cpp
@@ -18,9 +18,9 @@
Boston, MA 02110-1301, USA.
*/
-#include <qcstring.h>
-#include <qdom.h>
-#include <qfileinfo.h>
+#include <tqcstring.h>
+#include <tqdom.h>
+#include <tqfileinfo.h>
#include <kapplication.h>
#include <kdebug.h>
@@ -45,8 +45,8 @@ struct Engine::Private
KNewStuff *mNewStuff;
};
-Engine::Engine( KNewStuff *newStuff, const QString &type,
- QWidget *parentWidget ) :
+Engine::Engine( KNewStuff *newStuff, const TQString &type,
+ TQWidget *parentWidget ) :
mParentWidget( parentWidget ), mDownloadDialog( 0 ),
mUploadDialog( 0 ), mProviderDialog( 0 ), mUploadProvider( 0 ),
d(new Private), mType( type )
@@ -56,8 +56,8 @@ Engine::Engine( KNewStuff *newStuff, const QString &type,
mProviderLoader = new ProviderLoader( mParentWidget );
}
-Engine::Engine( KNewStuff *newStuff, const QString &type,
- const QString &providerList, QWidget *parentWidget ) :
+Engine::Engine( KNewStuff *newStuff, const TQString &type,
+ const TQString &providerList, TQWidget *parentWidget ) :
mParentWidget( parentWidget ),
mDownloadDialog( 0 ), mUploadDialog( 0 ),
mProviderDialog( 0 ), mUploadProvider( 0 ),
@@ -83,8 +83,8 @@ void Engine::download()
kdDebug() << "Engine::download()" << endl;
connect( mProviderLoader,
- SIGNAL( providersLoaded( Provider::List * ) ),
- SLOT( getMetaInformation( Provider::List * ) ) );
+ TQT_SIGNAL( providersLoaded( Provider::List * ) ),
+ TQT_SLOT( getMetaInformation( Provider::List * ) ) );
mProviderLoader->load( mType, mProviderList );
}
@@ -105,25 +105,25 @@ void Engine::getMetaInformation( Provider::List *providers )
if ( p->downloadUrl().isEmpty() ) continue;
KIO::TransferJob *job = KIO::get( p->downloadUrl(), false, false );
- connect( job, SIGNAL( result( KIO::Job * ) ),
- SLOT( slotNewStuffJobResult( KIO::Job * ) ) );
- connect( job, SIGNAL( data( KIO::Job *, const QByteArray & ) ),
- SLOT( slotNewStuffJobData( KIO::Job *, const QByteArray & ) ) );
+ 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 & ) ) );
mNewStuffJobData.insert( job, "" );
mProviderJobs[ job ] = p;
}
}
-void Engine::slotNewStuffJobData( KIO::Job *job, const QByteArray &data )
+void Engine::slotNewStuffJobData( KIO::Job *job, const TQByteArray &data )
{
if ( data.isEmpty() ) return;
kdDebug() << "Engine:slotNewStuffJobData()" << endl;
- QCString str( data, data.size() + 1 );
+ TQCString str( data, data.size() + 1 );
- mNewStuffJobData[ job ].append( QString::fromUtf8( str ) );
+ mNewStuffJobData[ job ].append( TQString::fromUtf8( str ) );
}
void Engine::slotNewStuffJobResult( KIO::Job *job )
@@ -132,25 +132,25 @@ void Engine::slotNewStuffJobResult( KIO::Job *job )
kdDebug() << "Error downloading new stuff descriptions." << endl;
job->showErrorDialog( mParentWidget );
} else {
- QString knewstuffDoc = mNewStuffJobData[ job ];
+ TQString knewstuffDoc = mNewStuffJobData[ job ];
kdDebug() << "---START---" << endl << knewstuffDoc << "---END---" << endl;
mDownloadDialog->addProvider( mProviderJobs[ job ] );
- QDomDocument doc;
+ TQDomDocument doc;
if ( !doc.setContent( knewstuffDoc ) ) {
kdDebug() << "Error parsing knewstuff.xml." << endl;
return;
} else {
- QDomElement knewstuff = doc.documentElement();
+ TQDomElement knewstuff = doc.documentElement();
if ( knewstuff.isNull() ) {
kdDebug() << "No document in knewstuffproviders.xml." << endl;
} else {
- QDomNode p;
+ TQDomNode p;
for ( p = knewstuff.firstChild(); !p.isNull(); p = p.nextSibling() ) {
- QDomElement stuff = p.toElement();
+ TQDomElement stuff = p.toElement();
if ( stuff.tagName() != "stuff" ) continue;
if ( stuff.attribute("type", mType) != mType ) continue;
@@ -200,8 +200,8 @@ void Engine::download( Entry *entry )
kdDebug() << " DESTINATION: " << destination.url() << endl;
KIO::FileCopyJob *job = KIO::file_copy( source, destination, -1, true );
- connect( job, SIGNAL( result( KIO::Job * ) ),
- SLOT( slotDownloadJobResult( KIO::Job * ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job * ) ),
+ TQT_SLOT( slotDownloadJobResult( KIO::Job * ) ) );
}
void Engine::slotDownloadJobResult( KIO::Job *job )
@@ -224,14 +224,14 @@ void Engine::slotDownloadJobResult( KIO::Job *job )
}
}
-void Engine::upload(const QString &fileName, const QString &previewName )
+void Engine::upload(const TQString &fileName, const TQString &previewName )
{
mUploadFile = fileName;
mPreviewFile = previewName;
connect( mProviderLoader,
- SIGNAL( providersLoaded( Provider::List * ) ),
- SLOT( selectUploadProvider( Provider::List * ) ) );
+ TQT_SIGNAL( providersLoaded( Provider::List * ) ),
+ TQT_SLOT( selectUploadProvider( Provider::List * ) ) );
mProviderLoader->load( mType );
}
@@ -272,7 +272,7 @@ void Engine::upload( Entry *entry )
{
if ( mUploadFile.isNull()) {
mUploadFile = entry->fullName();
- mUploadFile = locateLocal( "data", QString(kapp->instanceName()) + "/upload/" + mUploadFile );
+ mUploadFile = locateLocal( "data", TQString(kapp->instanceName()) + "/upload/" + mUploadFile );
if ( !d->mNewStuff->createUploadFile( mUploadFile ) ) {
KMessageBox::error( mParentWidget, i18n("Unable to create file to upload.") );
@@ -281,8 +281,8 @@ void Engine::upload( Entry *entry )
}
}
- QString lang = entry->langs().first();
- QFileInfo fi( mUploadFile );
+ TQString lang = entry->langs().first();
+ TQFileInfo fi( mUploadFile );
entry->setPayload( KURL::fromPathOrURL( fi.fileName() ), lang );
if ( !createMetaFile( entry ) ) {
@@ -290,7 +290,7 @@ void Engine::upload( Entry *entry )
return;
}
- QString text = i18n("The files to be uploaded have been created at:\n");
+ TQString text = i18n("The files to be uploaded have been created at:\n");
text.append( i18n("Data file: %1\n").arg( mUploadFile) );
if (!mPreviewFile.isEmpty()) {
text.append( i18n("Preview image: %1\n").arg( mPreviewFile) );
@@ -299,7 +299,7 @@ void Engine::upload( Entry *entry )
text.append( i18n("Those files can now be uploaded.\n") );
text.append( i18n("Beware that any people might have access to them at any time.") );
- QString caption = i18n("Upload Files");
+ TQString caption = i18n("Upload Files");
if ( mUploadProvider->noUpload() ) {
KURL noUploadUrl = mUploadProvider->noUploadUrl();
@@ -322,8 +322,8 @@ void Engine::upload( Entry *entry )
destination.setFileName( fi.fileName() );
KIO::FileCopyJob *job = KIO::file_copy( KURL::fromPathOrURL( mUploadFile ), destination );
- connect( job, SIGNAL( result( KIO::Job * ) ),
- SLOT( slotUploadPayloadJobResult( KIO::Job * ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job * ) ),
+ TQT_SLOT( slotUploadPayloadJobResult( KIO::Job * ) ) );
} else {
emit uploadFinished( false );
}
@@ -332,10 +332,10 @@ void Engine::upload( Entry *entry )
bool Engine::createMetaFile( Entry *entry )
{
- QDomDocument doc("knewstuff");
+ TQDomDocument doc("knewstuff");
doc.appendChild( doc.createProcessingInstruction(
"xml", "version=\"1.0\" encoding=\"UTF-8\"" ) );
- QDomElement de = doc.createElement("knewstuff");
+ TQDomElement de = doc.createElement("knewstuff");
doc.appendChild( de );
entry->setType(type());
@@ -346,17 +346,17 @@ bool Engine::createMetaFile( Entry *entry )
if ( mUploadMetaFile.isNull() ) {
mUploadMetaFile = entry->fullName() + ".meta";
- mUploadMetaFile = locateLocal( "data", QString(kapp->instanceName()) + "/upload/" + mUploadMetaFile );
+ mUploadMetaFile = locateLocal( "data", TQString(kapp->instanceName()) + "/upload/" + mUploadMetaFile );
}
- QFile f( mUploadMetaFile );
+ TQFile f( mUploadMetaFile );
if ( !f.open( IO_WriteOnly ) ) {
- mUploadMetaFile = QString::null;
+ mUploadMetaFile = TQString::null;
return false;
}
- QTextStream ts( &f );
- ts.setEncoding( QTextStream::UnicodeUTF8 );
+ TQTextStream ts( &f );
+ ts.setEncoding( TQTextStream::UnicodeUTF8 );
ts << doc.toString();
f.close();
@@ -378,14 +378,14 @@ void Engine::slotUploadPayloadJobResult( KIO::Job *job )
return;
}
- QFileInfo fi( mPreviewFile );
+ TQFileInfo fi( mPreviewFile );
KURL previewDestination = mUploadProvider->uploadUrl();
previewDestination.setFileName( fi.fileName() );
KIO::FileCopyJob *newJob = KIO::file_copy( KURL::fromPathOrURL( mPreviewFile ), previewDestination );
- connect( newJob, SIGNAL( result( KIO::Job * ) ),
- SLOT( slotUploadPreviewJobResult( KIO::Job * ) ) );
+ connect( newJob, TQT_SIGNAL( result( KIO::Job * ) ),
+ TQT_SLOT( slotUploadPreviewJobResult( KIO::Job * ) ) );
}
void Engine::slotUploadPreviewJobResult( KIO::Job *job )
@@ -397,19 +397,19 @@ void Engine::slotUploadPreviewJobResult( KIO::Job *job )
return;
}
- QFileInfo fi( mUploadMetaFile );
+ TQFileInfo fi( mUploadMetaFile );
KURL metaDestination = mUploadProvider->uploadUrl();
metaDestination.setFileName( fi.fileName() );
KIO::FileCopyJob *newJob = KIO::file_copy( KURL::fromPathOrURL( mUploadMetaFile ), metaDestination );
- connect( newJob, SIGNAL( result( KIO::Job * ) ),
- SLOT( slotUploadMetaJobResult( KIO::Job * ) ) );
+ connect( newJob, TQT_SIGNAL( result( KIO::Job * ) ),
+ TQT_SLOT( slotUploadMetaJobResult( KIO::Job * ) ) );
}
void Engine::slotUploadMetaJobResult( KIO::Job *job )
{
- mUploadMetaFile = QString::null;
+ mUploadMetaFile = TQString::null;
if ( job->error() ) {
kdDebug() << "Error uploading new stuff metadata." << endl;
job->showErrorDialog( mParentWidget );
diff --git a/knewstuff/engine.h b/knewstuff/engine.h
index 0d4941095..d3834566f 100644
--- a/knewstuff/engine.h
+++ b/knewstuff/engine.h
@@ -20,9 +20,9 @@
#ifndef KNEWSTUFF_ENGINE_H
#define KNEWSTUFF_ENGINE_H
-#include <qmap.h>
-#include <qobject.h>
-#include <qstring.h>
+#include <tqmap.h>
+#include <tqobject.h>
+#include <tqstring.h>
#include "entry.h"
#include "provider.h"
@@ -60,7 +60,7 @@ class KDE_EXPORT Engine : public QObject
@param type the Hotstuff data type such as "korganizer/calendar"
@param parentWidget the parent window
*/
- Engine( KNewStuff *newStuff, const QString &type, QWidget *parentWidget = 0 );
+ Engine( KNewStuff *newStuff, const TQString &type, TQWidget *parentWidget = 0 );
/**
Constructor.
@@ -69,7 +69,7 @@ class KDE_EXPORT Engine : public QObject
@param providerList the URL of the provider list
@param parentWidget the parent window
*/
- Engine( KNewStuff *newStuff, const QString &type, const QString &providerList, QWidget *parentWidget = 0 );
+ Engine( KNewStuff *newStuff, const TQString &type, const TQString &providerList, TQWidget *parentWidget = 0 );
/**
Destructor.
@@ -81,14 +81,14 @@ class KDE_EXPORT Engine : public QObject
@return the Hotstuff data type
*/
- QString type() const { return mType; }
+ TQString type() const { return mType; }
/**
Returns the previously set parent widget.
@return parent widget
*/
- QWidget *parentWidget() const { return mParentWidget; }
+ TQWidget *parentWidget() const { return mParentWidget; }
/**
Initiates the download process, retrieving provider lists and invoking
@@ -103,7 +103,7 @@ class KDE_EXPORT Engine : public QObject
@param fileName name of the payload data file
@param previewName name of the preview image file
*/
- void upload( const QString &fileName = QString::null, const QString &previewName = QString::null );
+ void upload( const TQString &fileName = TQString::null, const TQString &previewName = TQString::null );
/**
Downloads the specified data file.
@@ -143,7 +143,7 @@ class KDE_EXPORT Engine : public QObject
void getMetaInformation( Provider::List *providers );
void selectUploadProvider( Provider::List *providers );
- void slotNewStuffJobData( KIO::Job *job, const QByteArray &data );
+ void slotNewStuffJobData( KIO::Job *job, const TQByteArray &data );
void slotNewStuffJobResult( KIO::Job *job );
void slotDownloadJobResult( KIO::Job *job );
@@ -156,31 +156,31 @@ class KDE_EXPORT Engine : public QObject
bool createMetaFile( Entry * );
private:
- QWidget *mParentWidget;
+ TQWidget *mParentWidget;
ProviderLoader *mProviderLoader;
- QMap<KIO::Job *,QString> mNewStuffJobData;
- QMap<KIO::Job *,Provider *> mProviderJobs;
+ TQMap<KIO::Job *,TQString> mNewStuffJobData;
+ TQMap<KIO::Job *,Provider *> mProviderJobs;
- QPtrList<Entry> mNewStuffList;
+ TQPtrList<Entry> mNewStuffList;
DownloadDialog *mDownloadDialog;
UploadDialog *mUploadDialog;
ProviderDialog *mProviderDialog;
- QString mDownloadDestination;
+ TQString mDownloadDestination;
Provider *mUploadProvider;
- QString mUploadMetaFile;
- QString mUploadFile;
- QString mPreviewFile;
- QString mProviderList;
+ TQString mUploadMetaFile;
+ TQString mUploadFile;
+ TQString mPreviewFile;
+ TQString mProviderList;
Private* d;
- QString mType;
+ TQString mType;
};
}
diff --git a/knewstuff/entry.cpp b/knewstuff/entry.cpp
index 1a7f580db..cdbf4dbe7 100644
--- a/knewstuff/entry.cpp
+++ b/knewstuff/entry.cpp
@@ -20,8 +20,8 @@
#include "entry.h"
-#include <qptrdict.h>
-#include <qwindowdefs.h>
+#include <tqptrdict.h>
+#include <tqwindowdefs.h>
#include <kglobal.h>
#include <klocale.h>
@@ -34,17 +34,17 @@ class EntryPrivate
{
public:
EntryPrivate(){}
- QString mEmail;
- QMap<QString,QString> mNameMap;
+ TQString mEmail;
+ TQMap<TQString,TQString> mNameMap;
};
-static QPtrDict<EntryPrivate> *d_ptr = 0;
+static TQPtrDict<EntryPrivate> *d_ptr = 0;
static EntryPrivate *d(const Entry *e)
{
if(!d_ptr)
{
- d_ptr = new QPtrDict<EntryPrivate>();
+ d_ptr = new TQPtrDict<EntryPrivate>();
d_ptr->setAutoDelete(true);
}
EntryPrivate *ret = d_ptr->find((void*)e);
@@ -56,31 +56,31 @@ static EntryPrivate *d(const Entry *e)
return ret;
}
-QString Entry::authorEmail() const
+TQString Entry::authorEmail() const
{
return d(this)->mEmail;
}
-void Entry::setAuthorEmail( const QString& email )
+void Entry::setAuthorEmail( const TQString& email )
{
d(this)->mEmail = email;
}
-QString Entry::name( const QString &lang ) const
+TQString Entry::name( const TQString &lang ) const
{
- if ( d(this)->mNameMap.isEmpty() ) return QString::null;
+ if ( d(this)->mNameMap.isEmpty() ) return TQString::null;
if ( !d(this)->mNameMap[ lang ].isEmpty() ) return d(this)->mNameMap[ lang ];
else {
- QStringList langs = KGlobal::locale()->languageList();
- for(QStringList::Iterator it = langs.begin(); it != langs.end(); ++it)
+ TQStringList langs = KGlobal::locale()->languageList();
+ for(TQStringList::Iterator it = langs.begin(); it != langs.end(); ++it)
if( !d(this)->mNameMap[ *it ].isEmpty() ) return d(this)->mNameMap[ *it ];
}
- if ( !d(this)->mNameMap[ QString::null ].isEmpty() ) return d(this)->mNameMap[ QString::null ];
+ if ( !d(this)->mNameMap[ TQString::null ].isEmpty() ) return d(this)->mNameMap[ TQString::null ];
else return *(mSummaryMap.begin());
}
-void Entry::setName( const QString &name, const QString &lang )
+void Entry::setName( const TQString &name, const TQString &lang )
{
d(this)->mNameMap.insert( lang, name );
@@ -90,12 +90,12 @@ void Entry::setName( const QString &name, const QString &lang )
// BCI part ends here
Entry::Entry() :
- mRelease( 0 ), mReleaseDate( QDate::currentDate() ), mRating( 0 ),
+ mRelease( 0 ), mReleaseDate( TQDate::currentDate() ), mRating( 0 ),
mDownloads( 0 )
{
}
-Entry::Entry( const QDomElement &e ) :
+Entry::Entry( const TQDomElement &e ) :
mRelease( 0 ), mRating( 0 ), mDownloads( 0 )
{
parseDomElement( e );
@@ -118,78 +118,78 @@ Entry::~Entry()
}
-void Entry::setName( const QString &name )
+void Entry::setName( const TQString &name )
{
mName = name;
}
-QString Entry::name() const
+TQString Entry::name() const
{
return mName;
}
-void Entry::setType( const QString &type )
+void Entry::setType( const TQString &type )
{
mType = type;
}
-QString Entry::type() const
+TQString Entry::type() const
{
return mType;
}
-void Entry::setAuthor( const QString &author )
+void Entry::setAuthor( const TQString &author )
{
mAuthor = author;
}
-QString Entry::author() const
+TQString Entry::author() const
{
return mAuthor;
}
-void Entry::setLicence( const QString &license )
+void Entry::setLicence( const TQString &license )
{
mLicence = license;
}
-QString Entry::license() const
+TQString Entry::license() const
{
return mLicence;
}
-void Entry::setSummary( const QString &text, const QString &lang )
+void Entry::setSummary( const TQString &text, const TQString &lang )
{
mSummaryMap.insert( lang, text );
if ( mLangs.find( lang ) == mLangs.end() ) mLangs.append( lang );
}
-QString Entry::summary( const QString &lang ) const
+TQString Entry::summary( const TQString &lang ) const
{
- if ( mSummaryMap.isEmpty() ) return QString::null;
+ if ( mSummaryMap.isEmpty() ) return TQString::null;
if ( !mSummaryMap[ lang ].isEmpty() ) return mSummaryMap[ lang ];
else {
- QStringList langs = KGlobal::locale()->languageList();
- for(QStringList::Iterator it = langs.begin(); it != langs.end(); ++it)
+ TQStringList langs = KGlobal::locale()->languageList();
+ for(TQStringList::Iterator it = langs.begin(); it != langs.end(); ++it)
if( !mSummaryMap[ *it ].isEmpty() ) return mSummaryMap[ *it ];
}
- if ( !mSummaryMap[ QString::null ].isEmpty() ) return mSummaryMap[ QString::null ];
+ if ( !mSummaryMap[ TQString::null ].isEmpty() ) return mSummaryMap[ TQString::null ];
else return *(mSummaryMap.begin());
}
-void Entry::setVersion( const QString &version )
+void Entry::setVersion( const TQString &version )
{
mVersion = version;
}
-QString Entry::version() const
+TQString Entry::version() const
{
return mVersion;
}
@@ -206,33 +206,33 @@ int Entry::release() const
}
-void Entry::setReleaseDate( const QDate &d )
+void Entry::setReleaseDate( const TQDate &d )
{
mReleaseDate = d;
}
-QDate Entry::releaseDate() const
+TQDate Entry::releaseDate() const
{
return mReleaseDate;
}
-void Entry::setPayload( const KURL &url, const QString &lang )
+void Entry::setPayload( const KURL &url, const TQString &lang )
{
mPayloadMap.insert( lang, url );
if ( mLangs.find( lang ) == mLangs.end() ) mLangs.append( lang );
}
-KURL Entry::payload( const QString &lang ) const
+KURL Entry::payload( const TQString &lang ) const
{
KURL payload = mPayloadMap[ lang ];
if ( payload.isEmpty() ) {
- QStringList langs = KGlobal::locale()->languageList();
- for(QStringList::Iterator it = langs.begin(); it != langs.end(); ++it)
+ TQStringList langs = KGlobal::locale()->languageList();
+ for(TQStringList::Iterator it = langs.begin(); it != langs.end(); ++it)
if( !mPayloadMap[ *it ].isEmpty() ) return mPayloadMap[ *it ];
}
- if ( payload.isEmpty() ) payload = mPayloadMap [ QString::null ];
+ if ( payload.isEmpty() ) payload = mPayloadMap [ TQString::null ];
if ( payload.isEmpty() && !mPayloadMap.isEmpty() ) {
payload = *(mPayloadMap.begin());
}
@@ -240,22 +240,22 @@ KURL Entry::payload( const QString &lang ) const
}
-void Entry::setPreview( const KURL &url, const QString &lang )
+void Entry::setPreview( const KURL &url, const TQString &lang )
{
mPreviewMap.insert( lang, url );
if ( mLangs.find( lang ) == mLangs.end() ) mLangs.append( lang );
}
-KURL Entry::preview( const QString &lang ) const
+KURL Entry::preview( const TQString &lang ) const
{
KURL preview = mPreviewMap[ lang ];
if ( preview.isEmpty() ) {
- QStringList langs = KGlobal::locale()->languageList();
- for(QStringList::Iterator it = langs.begin(); it != langs.end(); ++it)
+ TQStringList langs = KGlobal::locale()->languageList();
+ for(TQStringList::Iterator it = langs.begin(); it != langs.end(); ++it)
if( !mPreviewMap[ *it ].isEmpty() ) return mPreviewMap[ *it ];
}
- if ( preview.isEmpty() ) preview = mPreviewMap [ QString::null ];
+ if ( preview.isEmpty() ) preview = mPreviewMap [ TQString::null ];
if ( preview.isEmpty() && !mPreviewMap.isEmpty() ) {
preview = *(mPreviewMap.begin());
}
@@ -284,56 +284,56 @@ int Entry::downloads()
return mDownloads;
}
-QString Entry::fullName()
+TQString Entry::fullName()
{
if ( version().isEmpty() )
return name();
else
- return name() + "-" + version() + "-" + QString::number( release() );
+ return name() + "-" + version() + "-" + TQString::number( release() );
}
-QStringList Entry::langs()
+TQStringList Entry::langs()
{
return mLangs;
}
-void Entry::parseDomElement( const QDomElement &element )
+void Entry::parseDomElement( const TQDomElement &element )
{
if ( element.tagName() != "stuff" ) return;
mType = element.attribute("type");
- QDomNode n;
+ TQDomNode n;
for( n = element.firstChild(); !n.isNull(); n = n.nextSibling() ) {
- QDomElement e = n.toElement();
+ TQDomElement e = n.toElement();
if ( e.tagName() == "name" )
{
- QString lang = e.attribute( "lang" );
+ TQString lang = e.attribute( "lang" );
setName( e.text().stripWhiteSpace(), lang );
if(lang.isNull()) setName( e.text().stripWhiteSpace() ); /* primary key - no i18n */
}
if ( e.tagName() == "author" ) {
setAuthor( e.text().stripWhiteSpace() );
- QString email = e.attribute( "email" );
+ TQString email = e.attribute( "email" );
setAuthorEmail( email );
}
if ( e.tagName() == "email" ) setAuthorEmail( e.text().stripWhiteSpace() ); /* kde-look; change on server! */
if ( e.tagName() == "licence" ) setLicence( e.text().stripWhiteSpace() );
if ( e.tagName() == "summary" ) {
- QString lang = e.attribute( "lang" );
+ TQString lang = e.attribute( "lang" );
setSummary( e.text().stripWhiteSpace(), lang );
}
if ( e.tagName() == "version" ) setVersion( e.text().stripWhiteSpace() );
if ( e.tagName() == "release" ) setRelease( e.text().toInt() );
if ( e.tagName() == "releasedate" ) {
- QDate date = QDate::fromString( e.text().stripWhiteSpace(), Qt::ISODate );
+ TQDate date = TQDate::fromString( e.text().stripWhiteSpace(), Qt::ISODate );
setReleaseDate( date );
}
if ( e.tagName() == "preview" ) {
- QString lang = e.attribute( "lang" );
+ TQString lang = e.attribute( "lang" );
setPreview( KURL( e.text().stripWhiteSpace() ), lang );
}
if ( e.tagName() == "payload" ) {
- QString lang = e.attribute( "lang" );
+ TQString lang = e.attribute( "lang" );
setPayload( KURL( e.text().stripWhiteSpace() ), lang );
}
if ( e.tagName() == "rating" ) setRating( e.text().toInt() );
@@ -341,10 +341,10 @@ void Entry::parseDomElement( const QDomElement &element )
}
}
-QDomElement Entry::createDomElement( QDomDocument &doc,
- QDomElement &parent )
+TQDomElement Entry::createDomElement( TQDomDocument &doc,
+ TQDomElement &parent )
{
- QDomElement entry = doc.createElement( "stuff" );
+ TQDomElement entry = doc.createElement( "stuff" );
entry.setAttribute("type", mType);
parent.appendChild( entry );
@@ -353,17 +353,17 @@ QDomElement Entry::createDomElement( QDomDocument &doc,
addElement( doc, entry, "email", authorEmail() );
addElement( doc, entry, "licence", license() );
addElement( doc, entry, "version", version() );
- addElement( doc, entry, "release", QString::number( release() ) );
- addElement( doc, entry, "rating", QString::number( rating() ) );
- addElement( doc, entry, "downloads", QString::number( downloads() ) );
+ addElement( doc, entry, "release", TQString::number( release() ) );
+ addElement( doc, entry, "rating", TQString::number( rating() ) );
+ addElement( doc, entry, "downloads", TQString::number( downloads() ) );
addElement( doc, entry, "releasedate",
releaseDate().toString( Qt::ISODate ) );
- QStringList ls = langs();
- QStringList::ConstIterator it;
+ TQStringList ls = langs();
+ TQStringList::ConstIterator it;
for( it = ls.begin(); it != ls.end(); ++it ) {
- QDomElement e = addElement( doc, entry, "summary", summary( *it ) );
+ TQDomElement e = addElement( doc, entry, "summary", summary( *it ) );
e.setAttribute( "lang", *it );
e = addElement( doc, entry, "preview", preview( *it ).url() );
e.setAttribute( "lang", *it );
@@ -374,10 +374,10 @@ QDomElement Entry::createDomElement( QDomDocument &doc,
return entry;
}
-QDomElement Entry::addElement( QDomDocument &doc, QDomElement &parent,
- const QString &tag, const QString &value )
+TQDomElement Entry::addElement( TQDomDocument &doc, TQDomElement &parent,
+ const TQString &tag, const TQString &value )
{
- QDomElement n = doc.createElement( tag );
+ TQDomElement n = doc.createElement( tag );
n.appendChild( doc.createTextNode( value ) );
parent.appendChild( n );
diff --git a/knewstuff/entry.h b/knewstuff/entry.h
index 0b6ba3fdd..6e8a15bc7 100644
--- a/knewstuff/entry.h
+++ b/knewstuff/entry.h
@@ -20,11 +20,11 @@
#ifndef KNEWSTUFF_ENTRY_H
#define KNEWSTUFF_ENTRY_H
-#include <qdatetime.h>
-#include <qdom.h>
-#include <qmap.h>
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqdatetime.h>
+#include <tqdom.h>
+#include <tqmap.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
#include <kurl.h>
@@ -48,7 +48,7 @@ class KDE_EXPORT Entry
/**
* Constructor.
*/
- Entry( const QDomElement & );
+ Entry( const TQDomElement & );
/**
* Destructor.
@@ -58,99 +58,99 @@ class KDE_EXPORT Entry
/**
* Sets the (unique) name for this data object.
*/
- void setName( const QString & );
+ void setName( const TQString & );
/**
* Sets the (internationalised) name for this data object.
*/
- void setName( const QString &, const QString & );
+ void setName( const TQString &, const TQString & );
/**
* Retrieve the name of the data object.
*
* @return object name
*/
- QString name() const;
+ TQString name() const;
/**
* Retrieve the internationalised name of the data object.
*
* @return object name (potentially translated)
*/
- QString name( const QString &lang ) const;
+ TQString name( const TQString &lang ) const;
/**
* Sets the application type, e.g. 'kdesktop/wallpaper'.
*/
- void setType( const QString & );
+ void setType( const TQString & );
/**
* Retrieve the type of the data object.
*
* @return object type
*/
- QString type() const;
+ TQString type() const;
/**
* Sets the full name of the object's author.
*/
- void setAuthor( const QString & );
+ void setAuthor( const TQString & );
/**
* Retrieve the author's name of the object.
*
* @return object author
*/
- QString author() const;
+ TQString author() const;
/**
* Sets the email address of the object's author.
*/
- void setAuthorEmail( const QString & );
+ void setAuthorEmail( const TQString & );
/**
* Retrieve the author's email address of the object.
*
* @return object author email address
*/
- QString authorEmail() const;
+ TQString authorEmail() const;
/**
* Sets the license (abbreviation) applicable to the object.
*/
- void setLicence( const QString & );
+ void setLicence( const TQString & );
/**
* Retrieve the license name of the object.
*
* @return object license
*/
- QString license() const;
+ TQString license() const;
/**
* Sets a short description on what the object is all about.
*/
- void setSummary( const QString &, const QString &lang = QString::null );
+ void setSummary( const TQString &, const TQString &lang = TQString::null );
/**
* Retrieve a short description about the object.
*
- * @param lang preferred language, or QString::null for KDE default
+ * @param lang preferred language, or TQString::null for KDE default
* @return object description
*/
- QString summary( const QString &lang = QString::null ) const;
+ TQString summary( const TQString &lang = TQString::null ) const;
/**
* Sets the version number.
*/
- void setVersion( const QString & );
+ void setVersion( const TQString & );
/**
* Retrieve the version string of the object.
*
* @return object version
*/
- QString version() const;
+ TQString version() const;
/**
* Sets the release number, which is increased for feature-equal objects
@@ -168,41 +168,41 @@ class KDE_EXPORT Entry
/**
* Sets the release date.
*/
- void setReleaseDate( const QDate & );
+ void setReleaseDate( const TQDate & );
/**
* Retrieve the date of the object's publication.
*
* @return object release date
*/
- QDate releaseDate() const;
+ TQDate releaseDate() const;
/**
* Sets the object's file.
*/
- void setPayload( const KURL &, const QString &lang = QString::null );
+ void setPayload( const KURL &, const TQString &lang = TQString::null );
/**
* Retrieve the file name of the object.
*
- * @param lang preferred language, or QString::null for KDE default
+ * @param lang preferred language, or TQString::null for KDE default
* @return object filename
*/
- KURL payload( const QString &lang = QString::null ) const;
+ KURL payload( const TQString &lang = TQString::null ) const;
/**
* Sets the object's preview file, if available. This should be a
* picture file.
*/
- void setPreview( const KURL &, const QString &lang = QString::null );
+ void setPreview( const KURL &, const TQString &lang = TQString::null );
/**
* Retrieve the file name of an image containing a preview of the object.
*
- * @param lang preferred language, or QString::null for KDE default
+ * @param lang preferred language, or TQString::null for KDE default
* @return object preview filename
*/
- KURL preview( const QString &lang = QString::null ) const;
+ KURL preview( const TQString &lang = TQString::null ) const;
/**
* Sets the rating between 0 (worst) and 10 (best).
@@ -238,42 +238,42 @@ class KDE_EXPORT Entry
* Return the full name for the meta information. It is constructed as
* name-version-release.
*/
- QString fullName();
+ TQString fullName();
/**
* Return the list of languages this object supports.
*/
- QStringList langs();
+ TQStringList langs();
/**
* @internal
*/
- void parseDomElement( const QDomElement & );
+ void parseDomElement( const TQDomElement & );
/**
* @internal
*/
- QDomElement createDomElement( QDomDocument &, QDomElement &parent );
+ TQDomElement createDomElement( TQDomDocument &, TQDomElement &parent );
protected:
- QDomElement addElement( QDomDocument &doc, QDomElement &parent,
- const QString &tag, const QString &value );
+ TQDomElement addElement( TQDomDocument &doc, TQDomElement &parent,
+ const TQString &tag, const TQString &value );
private:
- QString mName;
- QString mType;
- QString mAuthor;
- QString mLicence;
- QMap<QString,QString> mSummaryMap;
- QString mVersion;
+ TQString mName;
+ TQString mType;
+ TQString mAuthor;
+ TQString mLicence;
+ TQMap<TQString,TQString> mSummaryMap;
+ TQString mVersion;
int mRelease;
- QDate mReleaseDate;
- QMap<QString,KURL> mPayloadMap;
- QMap<QString,KURL> mPreviewMap;
+ TQDate mReleaseDate;
+ TQMap<TQString,KURL> mPayloadMap;
+ TQMap<TQString,KURL> mPreviewMap;
int mRating;
int mDownloads;
- QStringList mLangs;
+ TQStringList mLangs;
};
}
diff --git a/knewstuff/ghns.cpp b/knewstuff/ghns.cpp
index 6c273b03a..90596da3d 100644
--- a/knewstuff/ghns.cpp
+++ b/knewstuff/ghns.cpp
@@ -20,10 +20,10 @@
*/
#include <iostream>
-#include <qlayout.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qlabel.h>
+#include <tqlayout.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqlabel.h>
#include <kaboutdata.h>
#include <kapplication.h>
@@ -43,25 +43,25 @@ GhnsWidget::GhnsWidget()
{
mWallpapers = new KNewStuffGeneric( "kdesktop/wallpaper", this );
- QBoxLayout *topLayout = new QVBoxLayout( this );
+ TQBoxLayout *topLayout = new TQVBoxLayout( this );
topLayout->setMargin( KDialog::marginHint() );
topLayout->setSpacing( KDialog::spacingHint() );
- topLayout->addWidget( new QLabel( i18n("Get hot new stuff:"), this ) );
+ topLayout->addWidget( new TQLabel( i18n("Get hot new stuff:"), this ) );
- QPushButton *button = new QPushButton( "Wallpapers", this );
+ TQPushButton *button = new TQPushButton( "Wallpapers", this );
topLayout->addWidget( button );
- connect( button, SIGNAL( clicked() ), SLOT( downloadWallpapers() ) );
+ connect( button, TQT_SIGNAL( clicked() ), TQT_SLOT( downloadWallpapers() ) );
topLayout->addSpacing( 5 );
- QBoxLayout *buttonLayout = new QHBoxLayout( topLayout );
+ TQBoxLayout *buttonLayout = new TQHBoxLayout( topLayout );
buttonLayout->addStretch();
- QPushButton *closeButton = new QPushButton( "Close", this );
+ TQPushButton *closeButton = new TQPushButton( "Close", this );
buttonLayout->addWidget( closeButton );
- connect( closeButton, SIGNAL( clicked() ), kapp, SLOT( quit() ) );
+ connect( closeButton, TQT_SIGNAL( clicked() ), kapp, TQT_SLOT( quit() ) );
}
GhnsWidget::~GhnsWidget()
diff --git a/knewstuff/ghns.h b/knewstuff/ghns.h
index 4823bf526..0263c8f26 100644
--- a/knewstuff/ghns.h
+++ b/knewstuff/ghns.h
@@ -23,7 +23,7 @@
#include <stdlib.h>
-#include <qpushbutton.h>
+#include <tqpushbutton.h>
#include <kapplication.h>
#include <kdebug.h>
diff --git a/knewstuff/knewstuff.cpp b/knewstuff/knewstuff.cpp
index 5387e647f..6a37aa61d 100644
--- a/knewstuff/knewstuff.cpp
+++ b/knewstuff/knewstuff.cpp
@@ -30,8 +30,8 @@
using namespace KNS;
-KAction* KNS::standardAction(const QString& what,
- const QObject *recvr,
+KAction* KNS::standardAction(const TQString& what,
+ const TQObject *recvr,
const char *slot, KActionCollection* parent,
const char *name)
{
@@ -39,22 +39,22 @@ KAction* KNS::standardAction(const QString& what,
0, recvr, slot, parent, name);
}
-KNewStuff::KNewStuff( const QString &type, QWidget *parentWidget )
+KNewStuff::KNewStuff( const TQString &type, TQWidget *parentWidget )
{
mEngine = new Engine( this, type, parentWidget );
}
-KNewStuff::KNewStuff( const QString &type, const QString &providerList, QWidget *parentWidget )
+KNewStuff::KNewStuff( const TQString &type, const TQString &providerList, TQWidget *parentWidget )
{
mEngine = new Engine( this, type, providerList, parentWidget );
}
-QString KNewStuff::type() const
+TQString KNewStuff::type() const
{
return mEngine->type();
}
-QWidget *KNewStuff::parentWidget() const
+TQWidget *KNewStuff::parentWidget() const
{
return mEngine->parentWidget();
}
@@ -69,7 +69,7 @@ void KNewStuff::download()
mEngine->download();
}
-QString KNewStuff::downloadDestination( Entry * )
+TQString KNewStuff::downloadDestination( Entry * )
{
return KGlobal::dirs()->saveLocation( "tmp" ) +
KApplication::randomString( 10 );
@@ -80,7 +80,7 @@ void KNewStuff::upload()
mEngine->upload();
}
-void KNewStuff::upload( const QString &fileName, const QString previewName )
+void KNewStuff::upload( const TQString &fileName, const TQString previewName )
{
mEngine->upload(fileName, previewName);
}
diff --git a/knewstuff/knewstuff.h b/knewstuff/knewstuff.h
index ab03ade51..e1c0d8c2f 100644
--- a/knewstuff/knewstuff.h
+++ b/knewstuff/knewstuff.h
@@ -20,7 +20,7 @@
#ifndef KNEWSTUFF_H
#define KNEWSTUFF_H
-#include <qstring.h>
+#include <tqstring.h>
#include <kdemacros.h>
@@ -33,8 +33,8 @@ namespace KNS {
class Engine;
class Entry;
-KDE_EXPORT KAction* standardAction(const QString& what,
- const QObject *recvr,
+KDE_EXPORT KAction* standardAction(const TQString& what,
+ const TQObject *recvr,
const char *slot,
KActionCollection* parent,
const char *name = 0);
@@ -77,7 +77,7 @@ class KDE_EXPORT KNewStuff
@param parentWidget parent widget of dialogs opened by the KNewStuff
engine
*/
- KNewStuff( const QString &type, QWidget *parentWidget = 0 );
+ KNewStuff( const TQString &type, TQWidget *parentWidget = 0 );
/**
Constructor.
@@ -88,18 +88,18 @@ class KDE_EXPORT KNewStuff
@param parentWidget parent widget of dialogs opened by the KNewStuff
engine
*/
- KNewStuff( const QString &type, const QString &providerList, QWidget *parentWidget = 0 );
+ KNewStuff( const TQString &type, const TQString &providerList, TQWidget *parentWidget = 0 );
virtual ~KNewStuff();
/**
Return type of data.
*/
- QString type() const;
+ TQString type() const;
/**
Return parent widget.
*/
- QWidget *parentWidget() const;
+ TQWidget *parentWidget() const;
/**
Start download process.
@@ -114,7 +114,7 @@ class KDE_EXPORT KNewStuff
/**
Upload with pre-defined files.
*/
- void upload( const QString &fileName, const QString previewName );
+ void upload( const TQString &fileName, const TQString previewName );
/**
Install file to application. The given fileName points to the file
@@ -127,7 +127,7 @@ class KDE_EXPORT KNewStuff
@param fileName name of downloaded file
*/
- virtual bool install( const QString &fileName ) = 0;
+ virtual bool install( const TQString &fileName ) = 0;
/**
Create a file to be uploaded to a "new stuff provider" and return the
filename. The format of the file is application specific. The only
@@ -137,14 +137,14 @@ class KDE_EXPORT KNewStuff
@param fileName name of the file to be written
@return @c true on success, @c false on error.
*/
- virtual bool createUploadFile( const QString &fileName ) = 0;
+ virtual bool createUploadFile( const TQString &fileName ) = 0;
/**
Return a filename which should be used as destination for downloading the
specified new stuff entry. Reimplement this function, if you don't want
the new stuff to be downloaded to a temporary file.
*/
- virtual QString downloadDestination( KNS::Entry *entry );
+ virtual TQString downloadDestination( KNS::Entry *entry );
protected:
diff --git a/knewstuff/knewstuffbutton.cpp b/knewstuff/knewstuffbutton.cpp
index 97be51df5..3ad0d6ac6 100644
--- a/knewstuff/knewstuffbutton.cpp
+++ b/knewstuff/knewstuffbutton.cpp
@@ -27,10 +27,10 @@
namespace KNS
{
-Button::Button(const QString& what,
- const QString& providerList,
- const QString& resourceType,
- QWidget* parent, const char* name)
+Button::Button(const TQString& what,
+ const TQString& providerList,
+ const TQString& resourceType,
+ TQWidget* parent, const char* name)
: KPushButton(parent, name),
d(0),
m_providerList(providerList),
@@ -41,7 +41,7 @@ Button::Button(const QString& what,
init();
}
-Button::Button(QWidget* parent, const char* name)
+Button::Button(TQWidget* parent, const char* name)
: KPushButton(parent, name),
d(0),
m_downloadDialog(0)
@@ -53,20 +53,20 @@ Button::Button(QWidget* parent, const char* name)
void Button::init()
{
setIconSet(SmallIconSet("knewstuff"));
- connect(this, SIGNAL(clicked()), SLOT(showDialog()));
+ connect(this, TQT_SIGNAL(clicked()), TQT_SLOT(showDialog()));
}
-void Button::setButtonText(const QString& what)
+void Button::setButtonText(const TQString& what)
{
setText(i18n("Download New %1").arg(what));
}
-void Button::setProviderList(const QString& providerList)
+void Button::setProviderList(const TQString& providerList)
{
m_providerList = providerList;
}
-void Button::setResourceType(const QString& resourceType)
+void Button::setResourceType(const TQString& resourceType)
{
m_type = resourceType;
}
diff --git a/knewstuff/knewstuffbutton.h b/knewstuff/knewstuffbutton.h
index bcc090cd4..6935ba653 100644
--- a/knewstuff/knewstuffbutton.h
+++ b/knewstuff/knewstuffbutton.h
@@ -53,10 +53,10 @@ class Button : public KPushButton
* @param parent the parent widget
* @param name the name to be used for this widget
*/
- Button(const QString& what,
- const QString& providerList,
- const QString& resourceType,
- QWidget* parent, const char* name);
+ Button(const TQString& what,
+ const TQString& providerList,
+ const TQString& resourceType,
+ TQWidget* parent, const char* name);
/**
* Constructor used when the details of the KHotNewStuff
@@ -65,24 +65,24 @@ class Button : public KPushButton
* @param parent the parent widget
* @param name the name to be used for this widget
*/
- Button(QWidget* parent, const char* name);
+ Button(TQWidget* parent, const char* name);
/**
* set the URL to the list of providers for this button to use
*/
- void setProviderList(const QString& providerList);
+ void setProviderList(const TQString& providerList);
/**
* the Hotstuff data type for this downlaod such as
* "korganizer/calendar"
*/
- void setResourceType(const QString& resourceType);
+ void setResourceType(const TQString& resourceType);
/**
* set the text that should appear on the button. will be prefaced
* with i18n("Download New")
*/
- void setButtonText(const QString& what);
+ void setButtonText(const TQString& what);
signals:
/**
@@ -105,8 +105,8 @@ class Button : public KPushButton
class ButtonPrivate;
ButtonPrivate* d;
- QString m_providerList;
- QString m_type;
+ TQString m_providerList;
+ TQString m_type;
DownloadDialog* m_downloadDialog;
};
diff --git a/knewstuff/knewstuffgeneric.cpp b/knewstuff/knewstuffgeneric.cpp
index c1be1ccca..8438e25ea 100644
--- a/knewstuff/knewstuffgeneric.cpp
+++ b/knewstuff/knewstuffgeneric.cpp
@@ -19,9 +19,9 @@
Boston, MA 02110-1301, USA.
*/
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qdir.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqdir.h>
#include <kdebug.h>
#include <klocale.h>
@@ -37,7 +37,7 @@
using namespace std;
-KNewStuffGeneric::KNewStuffGeneric( const QString &type, QWidget *parent )
+KNewStuffGeneric::KNewStuffGeneric( const TQString &type, TQWidget *parent )
: KNewStuff( type, parent )
{
mConfig = KGlobal::config();
@@ -47,14 +47,14 @@ KNewStuffGeneric::~KNewStuffGeneric()
{
}
-bool KNewStuffGeneric::install( const QString &fileName )
+bool KNewStuffGeneric::install( const TQString &fileName )
{
kdDebug() << "KNewStuffGeneric::install(): " << fileName << endl;
- QStringList list, list2;
+ TQStringList list, list2;
mConfig->setGroup("KNewStuff");
- QString uncompress = mConfig->readEntry( "Uncompress" );
+ TQString uncompress = mConfig->readEntry( "Uncompress" );
if ( !uncompress.isEmpty() ) {
kdDebug() << "Uncompression method: " << uncompress << endl;
KTar tar(fileName, uncompress);
@@ -62,14 +62,14 @@ bool KNewStuffGeneric::install( const QString &fileName )
const KArchiveDirectory *dir = tar.directory();
dir->copyTo(destinationPath(0));
tar.close();
- QFile::remove(fileName);
+ TQFile::remove(fileName);
}
- QString cmd = mConfig->readEntry( "InstallationCommand" );
+ TQString cmd = mConfig->readEntry( "InstallationCommand" );
if ( !cmd.isEmpty() ) {
kdDebug() << "InstallationCommand: " << cmd << endl;
- list = QStringList::split( " ", cmd );
- for ( QStringList::iterator it = list.begin(); it != list.end(); ++it ) {
+ list = TQStringList::split( " ", cmd );
+ for ( TQStringList::iterator it = list.begin(); it != list.end(); ++it ) {
list2 << (*it).replace("%f", fileName);
}
KProcess proc;
@@ -80,14 +80,14 @@ bool KNewStuffGeneric::install( const QString &fileName )
return true;
}
-bool KNewStuffGeneric::createUploadFile( const QString & /*fileName*/ )
+bool KNewStuffGeneric::createUploadFile( const TQString & /*fileName*/ )
{
return false;
}
-QString KNewStuffGeneric::destinationPath( KNS::Entry *entry )
+TQString KNewStuffGeneric::destinationPath( KNS::Entry *entry )
{
- QString path, file, target, ext;
+ TQString path, file, target, ext;
mConfig->setGroup("KNewStuff");
@@ -99,7 +99,7 @@ QString KNewStuffGeneric::destinationPath( KNS::Entry *entry )
target = entry->fullName() + ext;
}
else target = "/";
- QString res = mConfig->readEntry( "StandardResource" );
+ TQString res = mConfig->readEntry( "StandardResource" );
if ( res.isEmpty() )
{
target = mConfig->readEntry("TargetDir");
@@ -116,13 +116,13 @@ QString KNewStuffGeneric::destinationPath( KNS::Entry *entry )
}
if ( res.isEmpty() && path.isEmpty() )
{
- if ( !entry ) return QString::null;
+ if ( !entry ) return TQString::null;
else return KNewStuff::downloadDestination( entry );
}
if ( !path.isEmpty() )
{
- file = QDir::home().path() + "/" + path + "/";
+ file = TQDir::home().path() + "/" + path + "/";
if ( entry ) file += entry->fullName() + ext;
}
else file = locateLocal( res.utf8() , target );
@@ -130,16 +130,16 @@ QString KNewStuffGeneric::destinationPath( KNS::Entry *entry )
return file;
}
-QString KNewStuffGeneric::downloadDestination( KNS::Entry *entry )
+TQString KNewStuffGeneric::downloadDestination( KNS::Entry *entry )
{
- QString file = destinationPath(entry);
+ TQString file = destinationPath(entry);
if ( KStandardDirs::exists( file ) ) {
int result = KMessageBox::warningContinueCancel( parentWidget(),
i18n("The file '%1' already exists. Do you want to overwrite it?")
.arg( file ),
- QString::null, i18n("Overwrite") );
- if ( result == KMessageBox::Cancel ) return QString::null;
+ TQString::null, i18n("Overwrite") );
+ if ( result == KMessageBox::Cancel ) return TQString::null;
}
return file;
diff --git a/knewstuff/knewstuffgeneric.h b/knewstuff/knewstuffgeneric.h
index 5443e24a3..6347bf539 100644
--- a/knewstuff/knewstuffgeneric.h
+++ b/knewstuff/knewstuffgeneric.h
@@ -30,7 +30,7 @@ class KConfig;
*
* This class is used for data uploads and installation.
* \code
- * QString payload, preview;
+ * TQString payload, preview;
* KNewStuffGeneric *ns = new KNewStuffGeneric("kamikaze/level", this);
* ns->upload(payload, preview);
* \endcode
@@ -48,7 +48,7 @@ class KDE_EXPORT KNewStuffGeneric : public KNewStuff
@param type a Hotstuff data type such as "korganizer/calendar"
@param parent the parent window.
*/
- KNewStuffGeneric( const QString &type, QWidget *parent = 0 );
+ KNewStuffGeneric( const TQString &type, TQWidget *parent = 0 );
~KNewStuffGeneric();
/**
@@ -57,7 +57,7 @@ class KDE_EXPORT KNewStuffGeneric : public KNewStuff
@param fileName filename of the donwloaded file
@return @c true in case of installation success, @c false otherwise
*/
- bool install( const QString &fileName );
+ bool install( const TQString &fileName );
/**
Creates a file suitable for upload.
@@ -67,7 +67,7 @@ class KDE_EXPORT KNewStuffGeneric : public KNewStuff
@param fileName the name of the file to upload after its creation
@return @c true in case of creation success, @c false otherwise
*/
- bool createUploadFile( const QString &fileName );
+ bool createUploadFile( const TQString &fileName );
/**
Queries the preferred destination file for a download.
@@ -75,10 +75,10 @@ class KDE_EXPORT KNewStuffGeneric : public KNewStuff
@param entry a Hotstuff data entry
@return destination filename, or 0 to return directory only
*/
- QString downloadDestination( KNS::Entry *entry );
+ TQString downloadDestination( KNS::Entry *entry );
private:
- QString destinationPath( KNS::Entry *entry );
+ TQString destinationPath( KNS::Entry *entry );
KConfig *mConfig;
};
diff --git a/knewstuff/knewstuffsecure.cpp b/knewstuff/knewstuffsecure.cpp
index 270d9449c..f68be7ae3 100644
--- a/knewstuff/knewstuffsecure.cpp
+++ b/knewstuff/knewstuffsecure.cpp
@@ -13,7 +13,7 @@
* *
***************************************************************************/
//qt includes
-#include <qfileinfo.h>
+#include <tqfileinfo.h>
//kde includes
#include <kconfig.h>
@@ -33,11 +33,11 @@
using namespace KNS;
-KNewStuffSecure::KNewStuffSecure(const QString &type, QWidget *parentWidget)
+KNewStuffSecure::KNewStuffSecure(const TQString &type, TQWidget *parentWidget)
: KNewStuff(type, parentWidget)
{
m_tempDir = 0L;
- connect(engine(), SIGNAL(uploadFinished(bool)), SLOT(slotUploadFinished(bool)));
+ connect(engine(), TQT_SIGNAL(uploadFinished(bool)), TQT_SLOT(slotUploadFinished(bool)));
}
@@ -46,7 +46,7 @@ KNewStuffSecure::~KNewStuffSecure()
removeTempDirectory();
}
-bool KNewStuffSecure::install(const QString &fileName)
+bool KNewStuffSecure::install(const TQString &fileName)
{
bool ok = true;
@@ -59,8 +59,8 @@ bool KNewStuffSecure::install(const QString &fileName)
const KArchiveDirectory *directory = tar.directory();
directory->copyTo(m_tempDir->name(), true);
m_tarName = "";
- QStringList entries = directory->entries();
- for (QStringList::Iterator it = entries.begin(); it != entries.end(); ++it)
+ TQStringList entries = directory->entries();
+ for (TQStringList::Iterator it = entries.begin(); it != entries.end(); ++it)
{
if (*it != "signature" && *it != "md5sum")
{
@@ -74,7 +74,7 @@ bool KNewStuffSecure::install(const QString &fileName)
else
{
m_tarName.prepend(m_tempDir->name());
- connect(Security::ref(), SIGNAL(validityResult(int)), this, SLOT(slotValidated(int)));
+ connect(Security::ref(), TQT_SIGNAL(validityResult(int)), this, TQT_SLOT(slotValidated(int)));
Security::ref()->checkValidity(m_tarName);
}
} else
@@ -86,8 +86,8 @@ bool KNewStuffSecure::install(const QString &fileName)
void KNewStuffSecure::slotValidated(int result)
{
- QString errorString;
- QString signatureStr;
+ TQString errorString;
+ TQString signatureStr;
bool valid = true;
if (result == -1)
{
@@ -147,14 +147,14 @@ void KNewStuffSecure::slotValidated(int result)
KConfig *cfg = KGlobal::config();
cfg->deleteGroup("KNewStuffStatus");
cfg->setGroup("KNewStuffStatus");
- for (QMap<QString, QString>::ConstIterator it = m_installedResources.constBegin(); it != m_installedResources.constEnd(); ++it)
+ for (TQMap<TQString, TQString>::ConstIterator it = m_installedResources.constBegin(); it != m_installedResources.constEnd(); ++it)
{
cfg->writeEntry(it.key(), it.data());
}
cfg->sync();
}
removeTempDirectory();
- disconnect(Security::ref(), SIGNAL(validityResult(int)), this, SLOT(slotValidated(int)));
+ disconnect(Security::ref(), TQT_SIGNAL(validityResult(int)), this, TQT_SLOT(slotValidated(int)));
}
void KNewStuffSecure::downloadResource()
@@ -165,19 +165,19 @@ void KNewStuffSecure::downloadResource()
KNewStuff::download();
}
-bool KNewStuffSecure::createUploadFile(const QString &fileName)
+bool KNewStuffSecure::createUploadFile(const TQString &fileName)
{
Q_UNUSED(fileName);
return true;
}
-void KNewStuffSecure::uploadResource(const QString& fileName)
+void KNewStuffSecure::uploadResource(const TQString& fileName)
{
- connect(Security::ref(), SIGNAL(fileSigned(int)), this, SLOT(slotFileSigned(int)));
+ connect(Security::ref(), TQT_SIGNAL(fileSigned(int)), this, TQT_SLOT(slotFileSigned(int)));
removeTempDirectory();
m_tempDir = new KTempDir();
m_tempDir->setAutoDelete(true);
- QFileInfo f(fileName);
+ TQFileInfo f(fileName);
m_signedFileName = m_tempDir->name() + "/" + f.fileName();
KIO::NetAccess::file_copy(KURL::fromPathOrURL(fileName), KURL::fromPathOrURL(m_signedFileName), -1, true);
Security::ref()->signFile(m_signedFileName);
@@ -194,30 +194,30 @@ void KNewStuffSecure::slotFileSigned(int result)
{
if (KMessageBox::warningContinueCancel(parentWidget(), i18n("There are no keys usable for signing or you did not entered the correct passphrase.\nProceed without signing the resource?")) == KMessageBox::Cancel)
{
- disconnect(Security::ref(), SIGNAL(fileSigned(int)), this, SLOT(slotFileSigned(int)));
+ disconnect(Security::ref(), TQT_SIGNAL(fileSigned(int)), this, TQT_SLOT(slotFileSigned(int)));
removeTempDirectory();
return;
}
}
KTar tar(m_signedFileName + ".signed", "application/x-gzip");
tar.open(IO_WriteOnly);
- QStringList files;
+ TQStringList files;
files << m_signedFileName;
files << m_tempDir->name() + "/md5sum";
files << m_tempDir->name() + "/signature";
- for (QStringList::Iterator it_f = files.begin(); it_f != files.end(); ++it_f)
+ for (TQStringList::Iterator it_f = files.begin(); it_f != files.end(); ++it_f)
{
- QFile file(*it_f);
+ TQFile file(*it_f);
file.open(IO_ReadOnly);
- QByteArray bArray = file.readAll();
- tar.writeFile(QFileInfo(file).fileName(), "user", "group", bArray.size(), bArray.data());
+ TQByteArray bArray = file.readAll();
+ tar.writeFile(TQFileInfo(file).fileName(), "user", "group", bArray.size(), bArray.data());
file.close();
}
tar.close();
KIO::NetAccess::file_move(KURL::fromPathOrURL(m_signedFileName + ".signed"), KURL::fromPathOrURL(m_signedFileName), -1, true);
- KNewStuff::upload(m_signedFileName, QString::null);
- disconnect(Security::ref(), SIGNAL(fileSigned(int)), this, SLOT(slotFileSigned(int)));
+ KNewStuff::upload(m_signedFileName, TQString::null);
+ disconnect(Security::ref(), TQT_SIGNAL(fileSigned(int)), this, TQT_SLOT(slotFileSigned(int)));
}
}
diff --git a/knewstuff/knewstuffsecure.h b/knewstuff/knewstuffsecure.h
index 2aed131a3..1a6bc44a1 100644
--- a/knewstuff/knewstuffsecure.h
+++ b/knewstuff/knewstuffsecure.h
@@ -17,7 +17,7 @@
#define KNEWSTUFFSECURE_H
//qt includes
-#include <qobject.h>
+#include <tqobject.h>
//kde includes
#include "knewstuff.h"
@@ -37,7 +37,7 @@ to the standard KNewStuff class.
@author Andras Mantia <amantia@kde.org>
*/
-class KDE_EXPORT KNewStuffSecure : public QObject, public KNewStuff
+class KDE_EXPORT KNewStuffSecure : public TQObject, public KNewStuff
{
Q_OBJECT
@@ -49,16 +49,16 @@ public:
@param parentWidget parent widget of dialogs opened by the KNewStuff
engine
*/
- KNewStuffSecure(const QString &type, QWidget *parentWidget=0);
+ KNewStuffSecure(const TQString &type, TQWidget *parentWidget=0);
virtual ~KNewStuffSecure();
/** Installs the downloaded resource. Do not call or reimplement directly.
It's reimplemented from KNewStuff for internal reasons.
*/
- bool install( const QString &fileName );
+ bool install( const TQString &fileName );
/** Reimplemented for internal reasons. */
- bool createUploadFile(const QString &fileName);
+ bool createUploadFile(const TQString &fileName);
/** Initiates a download. This is the method that must be called in
* order to download a signed resource. */
@@ -67,7 +67,7 @@ public:
/** Signs the file and uploads to the central server.
* @param fileName The file to be signed and uploaded
*/
- void uploadResource(const QString &fileName);
+ void uploadResource(const TQString &fileName);
private slots:
@@ -93,9 +93,9 @@ protected:
void removeTempDirectory();
KTempDir *m_tempDir;
- QString m_tarName;
- QString m_signedFileName;
- QMap<QString, QString> m_installedResources;
+ TQString m_tarName;
+ TQString m_signedFileName;
+ TQMap<TQString, TQString> m_installedResources;
};
#endif
diff --git a/knewstuff/provider.cpp b/knewstuff/provider.cpp
index 83e78ef92..c1d12853c 100644
--- a/knewstuff/provider.cpp
+++ b/knewstuff/provider.cpp
@@ -25,8 +25,8 @@
#include <kmessagebox.h>
#include <klocale.h>
-#include <qptrdict.h>
-#include <qwindowdefs.h>
+#include <tqptrdict.h>
+#include <tqwindowdefs.h>
#include "provider.h"
#include "provider.moc"
@@ -44,13 +44,13 @@ class ProviderPrivate
KURL mDownloadUrlDownloads;
};
-static QPtrDict<ProviderPrivate> *d_ptr_prov = 0;
+static TQPtrDict<ProviderPrivate> *d_ptr_prov = 0;
static ProviderPrivate *d_prov(const Provider *p)
{
if(!d_ptr_prov)
{
- d_ptr_prov = new QPtrDict<ProviderPrivate>();
+ d_ptr_prov = new TQPtrDict<ProviderPrivate>();
d_ptr_prov->setAutoDelete(true);
}
ProviderPrivate *ret = d_ptr_prov->find((void*)p);
@@ -62,7 +62,7 @@ static ProviderPrivate *d_prov(const Provider *p)
return ret;
}
-KURL Provider::downloadUrlVariant( QString variant ) const
+KURL Provider::downloadUrlVariant( TQString variant ) const
{
if((variant == "latest") && (d_prov(this)->mDownloadUrlLatest.isValid()))
return d_prov(this)->mDownloadUrlLatest;
@@ -80,7 +80,7 @@ Provider::Provider() : mNoUpload( false )
{
}
-Provider::Provider( const QDomElement &e ) : mNoUpload( false )
+Provider::Provider( const TQDomElement &e ) : mNoUpload( false )
{
parseDomElement( e );
}
@@ -102,12 +102,12 @@ Provider::~Provider()
}
-void Provider::setName( const QString &name )
+void Provider::setName( const TQString &name )
{
mName = name;
}
-QString Provider::name() const
+TQString Provider::name() const
{
return mName;
}
@@ -168,7 +168,7 @@ bool Provider::noUpload() const
}
-void Provider::parseDomElement( const QDomElement &element )
+void Provider::parseDomElement( const TQDomElement &element )
{
if ( element.tagName() != "provider" ) return;
@@ -184,21 +184,21 @@ void Provider::parseDomElement( const QDomElement &element )
if(!iconurl.isValid()) iconurl.setPath( element.attribute("icon") );
setIcon( iconurl );
- QDomNode n;
+ TQDomNode n;
for ( n = element.firstChild(); !n.isNull(); n = n.nextSibling() ) {
- QDomElement p = n.toElement();
+ TQDomElement p = n.toElement();
if ( p.tagName() == "noupload" ) setNoUpload( true );
if ( p.tagName() == "title" ) setName( p.text().stripWhiteSpace() );
}
}
-QDomElement Provider::createDomElement( QDomDocument &doc, QDomElement &parent )
+TQDomElement Provider::createDomElement( TQDomDocument &doc, TQDomElement &parent )
{
- QDomElement entry = doc.createElement( "stuff" );
+ TQDomElement entry = doc.createElement( "stuff" );
parent.appendChild( entry );
- QDomElement n = doc.createElement( "name" );
+ TQDomElement n = doc.createElement( "name" );
n.appendChild( doc.createTextNode( name() ) );
entry.appendChild( n );
@@ -206,13 +206,13 @@ QDomElement Provider::createDomElement( QDomDocument &doc, QDomElement &parent )
}
-ProviderLoader::ProviderLoader( QWidget *parentWidget ) :
- QObject( parentWidget )
+ProviderLoader::ProviderLoader( TQWidget *parentWidget ) :
+ TQObject( parentWidget )
{
mProviders.setAutoDelete( true );
}
-void ProviderLoader::load( const QString &type, const QString &providersList )
+void ProviderLoader::load( const TQString &type, const TQString &providersList )
{
kdDebug() << "ProviderLoader::load()" << endl;
@@ -222,13 +222,13 @@ void ProviderLoader::load( const QString &type, const QString &providersList )
KConfig *cfg = KGlobal::config();
cfg->setGroup("KNewStuff");
- QString providersUrl = providersList;
+ TQString providersUrl = providersList;
if( providersUrl.isEmpty() )
providersUrl = cfg->readEntry( "ProvidersUrl" );
if ( providersUrl.isEmpty() ) {
// TODO: Replace the default by the real one.
- QString server = cfg->readEntry( "MasterServer",
+ TQString server = cfg->readEntry( "MasterServer",
"http://korganizer.kde.org" );
providersUrl = server + "/knewstuff/" + type + "/providers.xml";
@@ -237,49 +237,49 @@ void ProviderLoader::load( const QString &type, const QString &providersList )
kdDebug() << "ProviderLoader::load(): providersUrl: " << providersUrl << endl;
KIO::TransferJob *job = KIO::get( KURL( providersUrl ), false, false );
- connect( job, SIGNAL( result( KIO::Job * ) ),
- SLOT( slotJobResult( KIO::Job * ) ) );
- connect( job, SIGNAL( data( KIO::Job *, const QByteArray & ) ),
- SLOT( slotJobData( KIO::Job *, const QByteArray & ) ) );
+ 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 & ) ) );
// job->dumpObjectInfo();
}
-void ProviderLoader::slotJobData( KIO::Job *, const QByteArray &data )
+void ProviderLoader::slotJobData( KIO::Job *, const TQByteArray &data )
{
kdDebug() << "ProviderLoader::slotJobData()" << endl;
if ( data.size() == 0 ) return;
- QCString str( data, data.size() + 1 );
+ TQCString str( data, data.size() + 1 );
- mJobData.append( QString::fromUtf8( str ) );
+ mJobData.append( TQString::fromUtf8( str ) );
}
void ProviderLoader::slotJobResult( KIO::Job *job )
{
if ( job->error() ) {
- job->showErrorDialog( static_cast<QWidget *>(parent()) );
+ job->showErrorDialog( static_cast<TQWidget *>(parent()) );
}
kdDebug() << "--PROVIDERS-START--" << endl << mJobData << "--PROV_END--"
<< endl;
- QDomDocument doc;
+ TQDomDocument doc;
if ( !doc.setContent( mJobData ) ) {
- KMessageBox::error( static_cast<QWidget *>(parent()), i18n("Error parsing providers list.") );
+ KMessageBox::error( static_cast<TQWidget *>(parent()), i18n("Error parsing providers list.") );
return;
}
- QDomElement providers = doc.documentElement();
+ TQDomElement providers = doc.documentElement();
if ( providers.isNull() ) {
kdDebug() << "No document in Providers.xml." << endl;
}
- QDomNode n;
+ TQDomNode n;
for ( n = providers.firstChild(); !n.isNull(); n = n.nextSibling() ) {
- QDomElement p = n.toElement();
+ TQDomElement p = n.toElement();
if ( p.tagName() == "provider" ) {
mProviders.append( new Provider( p ) );
diff --git a/knewstuff/provider.h b/knewstuff/provider.h
index e990fa919..6a0972319 100644
--- a/knewstuff/provider.h
+++ b/knewstuff/provider.h
@@ -20,11 +20,11 @@
#ifndef KNEWSTUFF_PROVIDER_H
#define KNEWSTUFF_PROVIDER_H
-#include <qcstring.h>
-#include <qdom.h>
-#include <qobject.h>
-#include <qptrlist.h>
-#include <qstring.h>
+#include <tqcstring.h>
+#include <tqdom.h>
+#include <tqobject.h>
+#include <tqptrlist.h>
+#include <tqstring.h>
#include <kurl.h>
@@ -46,7 +46,7 @@ namespace KNS {
class KDE_EXPORT Provider
{
public:
- typedef QPtrList<Provider> List;
+ typedef TQPtrList<Provider> List;
/**
* Constructor.
@@ -56,7 +56,7 @@ class KDE_EXPORT Provider
/**
* Constructor with XML feed.
*/
- Provider( const QDomElement & );
+ Provider( const TQDomElement & );
/**
* Destructor.
@@ -66,14 +66,14 @@ class KDE_EXPORT Provider
/**
* Sets the common name of the provider.
*/
- void setName( const QString & );
+ void setName( const TQString & );
/**
* Retrieves the common name of the provider.
*
* @return provider name
*/
- QString name() const;
+ TQString name() const;
/**
* Sets the download URL.
@@ -93,7 +93,7 @@ class KDE_EXPORT Provider
*
* @return download specific URL
*/
- KURL downloadUrlVariant( QString variant ) const;
+ KURL downloadUrlVariant( TQString variant ) const;
/**
* Sets the upload URL.
@@ -150,12 +150,12 @@ class KDE_EXPORT Provider
KURL icon() const;
protected:
- void parseDomElement( const QDomElement & );
+ void parseDomElement( const TQDomElement & );
- QDomElement createDomElement( QDomDocument &, QDomElement &parent );
+ TQDomElement createDomElement( TQDomDocument &, TQDomElement &parent );
private:
- QString mName;
+ TQString mName;
KURL mDownloadUrl;
KURL mUploadUrl;
KURL mNoUploadUrl;
@@ -178,7 +178,7 @@ class KDE_EXPORT ProviderLoader : public QObject
*
* @param parentWidget the parent widget
*/
- ProviderLoader( QWidget *parentWidget );
+ ProviderLoader( TQWidget *parentWidget );
/**
* Starts asynchronously loading the list of providers of the
@@ -189,7 +189,7 @@ class KDE_EXPORT ProviderLoader : public QObject
* we first try the ProvidersUrl from KGlobal::config, then we
* fall back to a hardcoded value.
*/
- void load( const QString &type, const QString &providerList = QString::null );
+ void load( const TQString &type, const TQString &providerList = TQString::null );
signals:
/**
@@ -198,13 +198,13 @@ class KDE_EXPORT ProviderLoader : public QObject
void providersLoaded( Provider::List * );
protected slots:
- void slotJobData( KIO::Job *, const QByteArray & );
+ void slotJobData( KIO::Job *, const TQByteArray & );
void slotJobResult( KIO::Job * );
private:
- QWidget *mParentWidget;
+ TQWidget *mParentWidget;
- QString mJobData;
+ TQString mJobData;
Provider::List mProviders;
};
diff --git a/knewstuff/providerdialog.cpp b/knewstuff/providerdialog.cpp
index 00374a341..a66258701 100644
--- a/knewstuff/providerdialog.cpp
+++ b/knewstuff/providerdialog.cpp
@@ -18,9 +18,9 @@
Boston, MA 02110-1301, USA.
*/
-#include <qlayout.h>
-#include <qstring.h>
-#include <qlabel.h>
+#include <tqlayout.h>
+#include <tqstring.h>
+#include <tqlabel.h>
#include <klistview.h>
#include <klocale.h>
@@ -49,16 +49,16 @@ class ProviderItem : public KListViewItem
Provider *mProvider;
};
-ProviderDialog::ProviderDialog( Engine *engine, QWidget *parent ) :
+ProviderDialog::ProviderDialog( Engine *engine, TQWidget *parent ) :
KDialogBase( Plain, i18n("Hot New Stuff Providers"), Ok | Cancel, Cancel,
parent, 0, false, true ),
mEngine( engine )
{
- QFrame *topPage = plainPage();
+ TQFrame *topPage = plainPage();
- QBoxLayout *topLayout = new QVBoxLayout( topPage );
+ TQBoxLayout *topLayout = new TQVBoxLayout( topPage );
- QLabel *description = new QLabel( i18n("Please select one of the providers listed below:"), topPage );
+ TQLabel *description = new TQLabel( i18n("Please select one of the providers listed below:"), topPage );
topLayout->addWidget( description );
mListView = new KListView( topPage );
diff --git a/knewstuff/providerdialog.h b/knewstuff/providerdialog.h
index c75cc3a1d..3e02e30aa 100644
--- a/knewstuff/providerdialog.h
+++ b/knewstuff/providerdialog.h
@@ -50,7 +50,7 @@ class ProviderDialog : public KDialogBase
@param engine a KNewStuff engine object
@param parent the parent window
*/
- ProviderDialog( Engine *engine, QWidget *parent );
+ ProviderDialog( Engine *engine, TQWidget *parent );
/**
Clears the list of providers.
diff --git a/knewstuff/security.cpp b/knewstuff/security.cpp
index f7099c722..8ef377b78 100644
--- a/knewstuff/security.cpp
+++ b/knewstuff/security.cpp
@@ -14,10 +14,10 @@
***************************************************************************/
//qt includes
-#include <qfile.h>
-#include <qfileinfo.h>
-#include <qstringlist.h>
-#include <qtimer.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
+#include <tqstringlist.h>
+#include <tqtimer.h>
//kde includes
#include <kdebug.h>
@@ -50,15 +50,15 @@ void Security::readKeys()
{
if (m_gpgRunning)
{
- QTimer::singleShot(5, this, SLOT(readKeys()));
+ TQTimer::singleShot(5, this, TQT_SLOT(readKeys()));
return;
}
m_runMode = List;
m_keys.clear();
KProcIO *readProcess=new KProcIO();
*readProcess << "gpg"<<"--no-secmem-warning"<<"--no-tty"<<"--with-colon"<<"--list-keys";
- connect(readProcess, SIGNAL(processExited(KProcess *)), this, SLOT(slotProcessExited(KProcess *)));
- connect(readProcess, SIGNAL(readReady(KProcIO *)) ,this, SLOT(slotDataArrived(KProcIO *)));
+ connect(readProcess, TQT_SIGNAL(processExited(KProcess *)), this, TQT_SLOT(slotProcessExited(KProcess *)));
+ connect(readProcess, TQT_SIGNAL(readReady(KProcIO *)) ,this, TQT_SLOT(slotDataArrived(KProcIO *)));
if (!readProcess->start(KProcess::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
@@ -69,14 +69,14 @@ void Security::readSecretKeys()
{
if (m_gpgRunning)
{
- QTimer::singleShot(5, this, SLOT(readSecretKeys()));
+ TQTimer::singleShot(5, this, TQT_SLOT(readSecretKeys()));
return;
}
m_runMode = ListSecret;
KProcIO *readProcess=new KProcIO();
*readProcess << "gpg"<<"--no-secmem-warning"<<"--no-tty"<<"--with-colon"<<"--list-secret-keys";
- connect(readProcess, SIGNAL(processExited(KProcess *)), this, SLOT(slotProcessExited(KProcess *)));
- connect(readProcess, SIGNAL(readReady(KProcIO *)) ,this, SLOT(slotDataArrived(KProcIO *)));
+ connect(readProcess, TQT_SIGNAL(processExited(KProcess *)), this, TQT_SLOT(slotProcessExited(KProcess *)));
+ connect(readProcess, TQT_SIGNAL(readReady(KProcIO *)) ,this, TQT_SLOT(slotDataArrived(KProcIO *)));
if (readProcess->start(KProcess::NotifyOnExit, true))
m_gpgRunning = true;
}
@@ -100,7 +100,7 @@ void Security::slotProcessExited(KProcess *process)
void Security::slotDataArrived(KProcIO *procIO)
{
- QString data;
+ TQString data;
while (procIO->readln(data, true) != -1)
{
switch (m_runMode)
@@ -114,10 +114,10 @@ void Security::slotDataArrived(KProcIO *procIO)
key.secret = false;
else
key.secret = true;
- QStringList line = QStringList::split(":", data, true);
+ TQStringList line = TQStringList::split(":", data, true);
key.id = line[4];
- QString shortId = key.id.right(8);
- QString trustStr = line[1];
+ TQString shortId = key.id.right(8);
+ TQString trustStr = line[1];
key.trusted = false;
if (trustStr == "u" || trustStr == "f")
key.trusted = true;
@@ -136,7 +136,7 @@ void Security::slotDataArrived(KProcIO *procIO)
{
m_result &= SIGNED_BAD_CLEAR;
m_result |= SIGNED_OK;
- QString id = data.section(" ", 1 , 1).right(8);
+ TQString id = data.section(" ", 1 , 1).right(8);
if (!m_keys.contains(id))
{
m_result |= UNKNOWN;
@@ -153,7 +153,7 @@ void Security::slotDataArrived(KProcIO *procIO)
if (data.startsWith("BADSIG"))
{
m_result |= SIGNED_BAD;
- QString id = data.section(" ", 1 , 1).right(8);
+ TQString id = data.section(" ", 1 , 1).right(8);
if (!m_keys.contains(id))
{
m_result |= UNKNOWN;
@@ -172,7 +172,7 @@ void Security::slotDataArrived(KProcIO *procIO)
case Sign:
if (data.find("passphrase.enter") != -1)
{
- QCString password;
+ TQCString password;
KeyStruct key = m_keys[m_secretKey];
int result = KPasswordDialog::getPassword(password, i18n("<qt>Enter passphrase for key <b>0x%1</b>, belonging to<br><i>%2&lt;%3&gt;</i>:</qt>").arg(m_secretKey).arg(key.name).arg(key.mail));
if (result == KPasswordDialog::Accepted)
@@ -196,7 +196,7 @@ void Security::slotDataArrived(KProcIO *procIO)
}
}
-void Security::checkValidity(const QString& filename)
+void Security::checkValidity(const TQString& filename)
{
m_fileName = filename;
slotCheckValidity();
@@ -206,7 +206,7 @@ void Security::slotCheckValidity()
{
if (!m_keysRead || m_gpgRunning)
{
- QTimer::singleShot(5, this, SLOT(slotCheckValidity()));
+ TQTimer::singleShot(5, this, TQT_SLOT(slotCheckValidity()));
return;
}
if (m_keys.count() == 0)
@@ -217,12 +217,12 @@ void Security::slotCheckValidity()
m_result = 0;
m_runMode = Verify;
- QFileInfo f(m_fileName);
+ TQFileInfo f(m_fileName);
//check the MD5 sum
- QString md5sum;
+ TQString md5sum;
const char* c = "";
KMD5 context(c);
- QFile file(m_fileName);
+ TQFile file(m_fileName);
if (file.open(IO_ReadOnly))
{
context.reset();
@@ -233,7 +233,7 @@ void Security::slotCheckValidity()
file.setName(f.dirPath() + "/md5sum");
if (file.open(IO_ReadOnly))
{
- QString md5sum_file;
+ TQString md5sum_file;
file.readLine(md5sum_file, 50);
if (!md5sum.isEmpty() && !md5sum_file.isEmpty() && md5sum_file.startsWith(md5sum))
m_result |= MD5_OK;
@@ -248,8 +248,8 @@ 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, SIGNAL(processExited(KProcess *)),this, SLOT(slotProcessExited(KProcess *)));
- connect(verifyProcess, SIGNAL(readReady(KProcIO *)),this, SLOT(slotDataArrived(KProcIO *)));
+ connect(verifyProcess, TQT_SIGNAL(processExited(KProcess *)),this, TQT_SLOT(slotProcessExited(KProcess *)));
+ connect(verifyProcess, TQT_SIGNAL(readReady(KProcIO *)),this, TQT_SLOT(slotDataArrived(KProcIO *)));
if (verifyProcess->start(KProcess::NotifyOnExit,true))
m_gpgRunning = true;
else
@@ -260,7 +260,7 @@ void Security::slotCheckValidity()
}
}
-void Security::signFile(const QString &fileName)
+void Security::signFile(const TQString &fileName)
{
m_fileName = fileName;
slotSignFile();
@@ -270,12 +270,12 @@ void Security::slotSignFile()
{
if (!m_keysRead || m_gpgRunning)
{
- QTimer::singleShot(5, this, SLOT(slotSignFile()));
+ TQTimer::singleShot(5, this, TQT_SLOT(slotSignFile()));
return;
}
- QStringList secretKeys;
- for (QMap<QString, KeyStruct>::Iterator it = m_keys.begin(); it != m_keys.end(); ++it)
+ TQStringList secretKeys;
+ for (TQMap<TQString, KeyStruct>::Iterator it = m_keys.begin(); it != m_keys.end(); ++it)
{
if (it.data().secret)
secretKeys.append(it.key());
@@ -288,13 +288,13 @@ void Security::slotSignFile()
}
m_result = 0;
- QFileInfo f(m_fileName);
+ TQFileInfo f(m_fileName);
//create the MD5 sum
- QString md5sum;
+ TQString md5sum;
const char* c = "";
KMD5 context(c);
- QFile file(m_fileName);
+ TQFile file(m_fileName);
if (file.open(IO_ReadOnly))
{
context.reset();
@@ -305,7 +305,7 @@ void Security::slotSignFile()
file.setName(f.dirPath() + "/md5sum");
if (file.open(IO_WriteOnly))
{
- QTextStream stream(&file);
+ TQTextStream stream(&file);
stream << md5sum;
m_result |= MD5_OK;
file.close();
@@ -328,8 +328,8 @@ 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, SIGNAL(processExited(KProcess *)),this, SLOT(slotProcessExited(KProcess *)));
- connect(signProcess, SIGNAL(readReady(KProcIO *)),this, SLOT(slotDataArrived(KProcIO *)));
+ connect(signProcess, TQT_SIGNAL(processExited(KProcess *)),this, TQT_SLOT(slotProcessExited(KProcess *)));
+ connect(signProcess, TQT_SIGNAL(readReady(KProcIO *)),this, TQT_SLOT(slotDataArrived(KProcIO *)));
m_runMode = Sign;
if (signProcess->start(KProcess::NotifyOnExit,true))
m_gpgRunning = true;
diff --git a/knewstuff/security.h b/knewstuff/security.h
index 03117fd96..2a4eca536 100644
--- a/knewstuff/security.h
+++ b/knewstuff/security.h
@@ -18,16 +18,16 @@
#define SECURITY_H
//qt includes
-#include <qmap.h>
-#include <qobject.h>
+#include <tqmap.h>
+#include <tqobject.h>
class KProcIO;
class KProcess;
struct KeyStruct {
- QString id;
- QString name;
- QString mail;
+ TQString id;
+ TQString name;
+ TQString mail;
bool trusted;
bool secret;
};
@@ -59,7 +59,7 @@ public:
* the file is should contain a "signature" and a "md5sum" file, otherwise verification will fail.
* The method is asynchronous and the result is signalled with @ref validityResult.
*/
- void checkValidity(const QString &fileName);
+ void checkValidity(const TQString &fileName);
/** Creates a signature and an md5sum file for the fileName and packs
* everything into a gzipped tarball.
@@ -67,7 +67,7 @@ public:
*
* The method is asynchronous and the result is signalled with @ref fileSigned.
*/
- void signFile(const QString &fileName);
+ void signFile(const TQString &fileName);
/** Get the key used for signing. This method is valid only if:
* - the checkValidity was called
* - the result of the validity check does not have the UNKNOWN bit set
@@ -115,9 +115,9 @@ private:
int m_runMode;
bool m_gpgRunning; /// true if gpg is currently running
bool m_keysRead; /// true if all the keys were read
- QMap<QString, KeyStruct> m_keys; /// holds information about the available key
- QString m_fileName; /// the file to sign/verify
- QString m_secretKey; /// the key used for signing
+ TQMap<TQString, KeyStruct> m_keys; /// holds information about the available key
+ TQString m_fileName; /// the file to sign/verify
+ TQString m_secretKey; /// the key used for signing
private slots:
void slotProcessExited(KProcess *process);
diff --git a/knewstuff/testnewstuff.cpp b/knewstuff/testnewstuff.cpp
index f9bc84ef2..b0c380c68 100644
--- a/knewstuff/testnewstuff.cpp
+++ b/knewstuff/testnewstuff.cpp
@@ -20,9 +20,9 @@
#include <iostream>
-#include <qlayout.h>
-#include <qfile.h>
-#include <qtextstream.h>
+#include <tqlayout.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
#include <kaboutdata.h>
#include <kapplication.h>
@@ -37,22 +37,22 @@
using namespace std;
-bool TestNewStuff::install( const QString &fileName )
+bool TestNewStuff::install( const TQString &fileName )
{
kdDebug() << "TestNewStuff::install(): " << fileName << endl;
- QFile f( fileName );
+ TQFile f( fileName );
if ( !f.open( IO_ReadOnly ) ) {
kdDebug() << "Error opening file." << endl;
return false;
}
- QTextStream ts( &f );
+ TQTextStream ts( &f );
kdDebug() << "--BEGIN-NEW_STUFF--" << endl;
cout << ts.read().utf8();
kdDebug() << "---END-NEW_STUFF---" << endl;
return true;
}
-bool TestNewStuff::createUploadFile( const QString &fileName )
+bool TestNewStuff::createUploadFile( const TQString &fileName )
{
KProcess p;
p << "touch" << fileName;
@@ -66,23 +66,23 @@ MyWidget::MyWidget()
{
mNewStuff = new TestNewStuff;
- QBoxLayout *topLayout = new QVBoxLayout( this );
+ TQBoxLayout *topLayout = new TQVBoxLayout( this );
topLayout->setMargin( KDialog::marginHint() );
topLayout->setSpacing( KDialog::spacingHint() );
- QPushButton *downloadButton = new QPushButton( "Download", this );
+ TQPushButton *downloadButton = new TQPushButton( "Download", this );
topLayout->addWidget( downloadButton );
- connect( downloadButton, SIGNAL( clicked() ), SLOT( download() ) );
+ connect( downloadButton, TQT_SIGNAL( clicked() ), TQT_SLOT( download() ) );
- QPushButton *uploadButton = new QPushButton( "Upload", this );
+ TQPushButton *uploadButton = new TQPushButton( "Upload", this );
topLayout->addWidget( uploadButton );
- connect( uploadButton, SIGNAL( clicked() ), SLOT( upload() ) );
+ connect( uploadButton, TQT_SIGNAL( clicked() ), TQT_SLOT( upload() ) );
topLayout->addSpacing( 5 );
- QPushButton *closeButton = new QPushButton( "Close", this );
+ TQPushButton *closeButton = new TQPushButton( "Close", this );
topLayout->addWidget( closeButton );
- connect( closeButton, SIGNAL( clicked() ), kapp, SLOT( quit() ) );
+ connect( closeButton, TQT_SIGNAL( clicked() ), kapp, TQT_SLOT( quit() ) );
}
MyWidget::~MyWidget()
diff --git a/knewstuff/testnewstuff.h b/knewstuff/testnewstuff.h
index b1981f723..da0149fda 100644
--- a/knewstuff/testnewstuff.h
+++ b/knewstuff/testnewstuff.h
@@ -23,7 +23,7 @@
#include <stdlib.h>
-#include <qpushbutton.h>
+#include <tqpushbutton.h>
#include <kapplication.h>
#include <kdebug.h>
@@ -35,9 +35,9 @@ class TestNewStuff : public KNewStuff
public:
TestNewStuff() : KNewStuff( "korganizer/calendar" ) {}
- bool install( const QString &fileName );
+ bool install( const TQString &fileName );
- bool createUploadFile( const QString &fileName );
+ bool createUploadFile( const TQString &fileName );
};
class MyWidget : public QWidget
diff --git a/knewstuff/uploaddialog.cpp b/knewstuff/uploaddialog.cpp
index 433cb9c4c..cecc67e32 100644
--- a/knewstuff/uploaddialog.cpp
+++ b/knewstuff/uploaddialog.cpp
@@ -18,12 +18,12 @@
Boston, MA 02110-1301, USA.
*/
-#include <qcombobox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qlineedit.h>
-#include <qspinbox.h>
-#include <qstring.h>
+#include <tqcombobox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
+#include <tqspinbox.h>
+#include <tqstring.h>
#include <ktextedit.h>
#include <klistview.h>
@@ -43,65 +43,65 @@
using namespace KNS;
-UploadDialog::UploadDialog( Engine *engine, QWidget *parent ) :
+UploadDialog::UploadDialog( Engine *engine, TQWidget *parent ) :
KDialogBase( Plain, i18n("Share Hot New Stuff"), Ok | Cancel, Cancel,
parent, 0, false, true ),
mEngine( engine )
{
mEntryList.setAutoDelete( true );
- QFrame *topPage = plainPage();
+ TQFrame *topPage = plainPage();
- QGridLayout *topLayout = new QGridLayout( topPage );
+ TQGridLayout *topLayout = new TQGridLayout( topPage );
topLayout->setSpacing( spacingHint() );
- QLabel *nameLabel = new QLabel( i18n("Name:"), topPage );
+ TQLabel *nameLabel = new TQLabel( i18n("Name:"), topPage );
topLayout->addWidget( nameLabel, 0, 0 );
- mNameEdit = new QLineEdit( topPage );
+ mNameEdit = new TQLineEdit( topPage );
topLayout->addWidget( mNameEdit, 0, 1 );
- QLabel *authorLabel = new QLabel( i18n("Author:"), topPage );
+ TQLabel *authorLabel = new TQLabel( i18n("Author:"), topPage );
topLayout->addWidget( authorLabel, 1, 0 );
- mAuthorEdit = new QLineEdit( topPage );
+ mAuthorEdit = new TQLineEdit( topPage );
topLayout->addWidget( mAuthorEdit, 1, 1 );
- QLabel *emailLabel = new QLabel( i18n("Email:"), topPage );
+ TQLabel *emailLabel = new TQLabel( i18n("Email:"), topPage );
topLayout->addWidget( emailLabel, 2, 0 );
- mEmailEdit = new QLineEdit( topPage );
+ mEmailEdit = new TQLineEdit( topPage );
topLayout->addWidget( mEmailEdit, 2, 1 );
- QLabel *versionLabel = new QLabel( i18n("Version:"), topPage );
+ TQLabel *versionLabel = new TQLabel( i18n("Version:"), topPage );
topLayout->addWidget( versionLabel, 3, 0 );
- mVersionEdit = new QLineEdit( topPage );
+ mVersionEdit = new TQLineEdit( topPage );
topLayout->addWidget( mVersionEdit, 3, 1 );
- QLabel *releaseLabel = new QLabel( i18n("Release:"), topPage );
+ TQLabel *releaseLabel = new TQLabel( i18n("Release:"), topPage );
topLayout->addWidget( releaseLabel, 4, 0 );
- mReleaseSpin = new QSpinBox( topPage );
+ mReleaseSpin = new TQSpinBox( topPage );
mReleaseSpin->setMinValue( 1 );
topLayout->addWidget( mReleaseSpin, 4, 1 );
- QLabel *licenceLabel = new QLabel( i18n("License:"), topPage );
+ TQLabel *licenceLabel = new TQLabel( i18n("License:"), topPage );
topLayout->addWidget( licenceLabel, 5, 0 );
- mLicenceCombo = new QComboBox( topPage );
+ mLicenceCombo = new TQComboBox( topPage );
mLicenceCombo->setEditable( true );
mLicenceCombo->insertItem( i18n("GPL") );
mLicenceCombo->insertItem( i18n("LGPL") );
mLicenceCombo->insertItem( i18n("BSD") );
topLayout->addWidget( mLicenceCombo, 5, 1 );
- QLabel *languageLabel = new QLabel( i18n("Language:"), topPage );
+ TQLabel *languageLabel = new TQLabel( i18n("Language:"), topPage );
topLayout->addWidget( languageLabel, 6, 0 );
- mLanguageCombo = new QComboBox( topPage );
+ mLanguageCombo = new TQComboBox( topPage );
topLayout->addWidget( mLanguageCombo, 6, 1 );
mLanguageCombo->insertStringList( KGlobal::locale()->languageList() );
- QLabel *previewLabel = new QLabel( i18n("Preview URL:"), topPage );
+ TQLabel *previewLabel = new TQLabel( i18n("Preview URL:"), topPage );
topLayout->addWidget( previewLabel, 7, 0 );
mPreviewUrl = new KURLRequester( topPage );
topLayout->addWidget( mPreviewUrl, 7, 1 );
- QLabel *summaryLabel = new QLabel( i18n("Summary:"), topPage );
+ TQLabel *summaryLabel = new TQLabel( i18n("Summary:"), topPage );
topLayout->addMultiCellWidget( summaryLabel, 8, 8, 0, 1 );
mSummaryEdit = new KTextEdit( topPage );
topLayout->addMultiCellWidget( mSummaryEdit, 9, 9, 0, 1 );
@@ -137,7 +137,7 @@ void UploadDialog::slotOk()
if ( mPayloadUrl.isValid() ) {
KConfig *conf = kapp->config();
- conf->setGroup( QString("KNewStuffUpload:%1").arg(mPayloadUrl.fileName()) );
+ conf->setGroup( TQString("KNewStuffUpload:%1").arg(mPayloadUrl.fileName()) );
conf->writeEntry("name", mNameEdit->text());
conf->writeEntry("author", mAuthorEdit->text());
conf->writeEntry("email", mEmailEdit->text());
@@ -155,26 +155,26 @@ void UploadDialog::slotOk()
accept();
}
-void UploadDialog::setPreviewFile( const QString &previewFile )
+void UploadDialog::setPreviewFile( const TQString &previewFile )
{
mPreviewUrl->setURL( previewFile );
}
-void UploadDialog::setPayloadFile( const QString &payloadFile )
+void UploadDialog::setPayloadFile( const TQString &payloadFile )
{
mPayloadUrl = payloadFile;
KConfig *conf = kapp->config();
- conf->setGroup( QString("KNewStuffUpload:%1").arg(mPayloadUrl.fileName()) );
- QString name = conf->readEntry("name");
- QString author = conf->readEntry("author");
- QString email = conf->readEntry("email");
- QString version = conf->readEntry("version");
- QString release = conf->readEntry("release");
- QString preview = conf->readEntry("preview");
- QString summary = conf->readEntry("summary");
- QString lang = conf->readEntry("language");
- QString licence = conf->readEntry("licence");
+ conf->setGroup( TQString("KNewStuffUpload:%1").arg(mPayloadUrl.fileName()) );
+ TQString name = conf->readEntry("name");
+ TQString author = conf->readEntry("author");
+ TQString email = conf->readEntry("email");
+ TQString version = conf->readEntry("version");
+ TQString release = conf->readEntry("release");
+ TQString preview = conf->readEntry("preview");
+ TQString summary = conf->readEntry("summary");
+ TQString lang = conf->readEntry("language");
+ TQString licence = conf->readEntry("licence");
mNameEdit->clear();
mAuthorEdit->clear();
@@ -188,7 +188,7 @@ void UploadDialog::setPayloadFile( const QString &payloadFile )
if(!name.isNull())
{
- int prefill = KMessageBox::questionYesNo(this, i18n("Old upload information found, fill out fields?"),QString::null,i18n("Fill Out"),i18n("Do Not Fill Out"));
+ int prefill = KMessageBox::questionYesNo(this, i18n("Old upload information found, fill out fields?"),TQString::null,i18n("Fill Out"),i18n("Do Not Fill Out"));
if(prefill == KMessageBox::Yes)
{
mNameEdit->setText(name);
diff --git a/knewstuff/uploaddialog.h b/knewstuff/uploaddialog.h
index c76de02df..4b70b212e 100644
--- a/knewstuff/uploaddialog.h
+++ b/knewstuff/uploaddialog.h
@@ -54,7 +54,7 @@ class UploadDialog : public KDialogBase
@param engine a KNewStuff engine object to be used for uploads
@param parent the parent window
*/
- UploadDialog( Engine *engine, QWidget *parent );
+ UploadDialog( Engine *engine, TQWidget *parent );
/**
Destructor.
@@ -67,7 +67,7 @@ class UploadDialog : public KDialogBase
@param previewFile the preview image file
*/
- void setPreviewFile( const QString &previewFile );
+ void setPreviewFile( const TQString &previewFile );
/**
Sets the payload filename.
@@ -76,7 +76,7 @@ class UploadDialog : public KDialogBase
@param payloadFile the payload data file
*/
- void setPayloadFile( const QString &payloadFile );
+ void setPayloadFile( const TQString &payloadFile );
protected slots:
void slotOk();
@@ -84,17 +84,17 @@ class UploadDialog : public KDialogBase
private:
Engine *mEngine;
- QLineEdit *mNameEdit;
- QLineEdit *mAuthorEdit;
- QLineEdit *mEmailEdit;
- QLineEdit *mVersionEdit;
- QSpinBox *mReleaseSpin;
+ TQLineEdit *mNameEdit;
+ TQLineEdit *mAuthorEdit;
+ TQLineEdit *mEmailEdit;
+ TQLineEdit *mVersionEdit;
+ TQSpinBox *mReleaseSpin;
KURLRequester *mPreviewUrl;
- QTextEdit *mSummaryEdit;
- QComboBox *mLanguageCombo;
- QComboBox *mLicenceCombo;
+ TQTextEdit *mSummaryEdit;
+ TQComboBox *mLanguageCombo;
+ TQComboBox *mLicenceCombo;
- QPtrList<Entry> mEntryList;
+ TQPtrList<Entry> mEntryList;
KURL mPayloadUrl;
};