summaryrefslogtreecommitdiffstats
path: root/lib/compatibility/knewstuff
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:54:04 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:54:04 +0000
commitdc6b8e72fed2586239e3514819238c520636c9d9 (patch)
tree88b200df0a0b7fab9d6f147596173556f1ed9a13 /lib/compatibility/knewstuff
parent6927d4436e54551917f600b706a8d6109e49de1c (diff)
downloadtdewebdev-dc6b8e72fed2586239e3514819238c520636c9d9.tar.gz
tdewebdev-dc6b8e72fed2586239e3514819238c520636c9d9.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdewebdev@1157656 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'lib/compatibility/knewstuff')
-rw-r--r--lib/compatibility/knewstuff/downloaddialog.cpp162
-rw-r--r--lib/compatibility/knewstuff/downloaddialog.h52
-rw-r--r--lib/compatibility/knewstuff/engine.cpp94
-rw-r--r--lib/compatibility/knewstuff/engine.h38
-rw-r--r--lib/compatibility/knewstuff/entry.cpp104
-rw-r--r--lib/compatibility/knewstuff/entry.h86
-rw-r--r--lib/compatibility/knewstuff/knewstuff.cpp16
-rw-r--r--lib/compatibility/knewstuff/knewstuff.h22
-rw-r--r--lib/compatibility/knewstuff/knewstuffgeneric.cpp42
-rw-r--r--lib/compatibility/knewstuff/knewstuffgeneric.h12
-rw-r--r--lib/compatibility/knewstuff/knewstuffsecure.cpp46
-rw-r--r--lib/compatibility/knewstuff/knewstuffsecure.h18
-rw-r--r--lib/compatibility/knewstuff/provider.cpp48
-rw-r--r--lib/compatibility/knewstuff/provider.h34
-rw-r--r--lib/compatibility/knewstuff/providerdialog.cpp14
-rw-r--r--lib/compatibility/knewstuff/providerdialog.h2
-rw-r--r--lib/compatibility/knewstuff/security.cpp70
-rw-r--r--lib/compatibility/knewstuff/security.h20
-rw-r--r--lib/compatibility/knewstuff/uploaddialog.cpp66
-rw-r--r--lib/compatibility/knewstuff/uploaddialog.h20
20 files changed, 483 insertions, 483 deletions
diff --git a/lib/compatibility/knewstuff/downloaddialog.cpp b/lib/compatibility/knewstuff/downloaddialog.cpp
index be3cf66d..b14ff38b 100644
--- a/lib/compatibility/knewstuff/downloaddialog.cpp
+++ b/lib/compatibility/knewstuff/downloaddialog.cpp
@@ -37,28 +37,28 @@
#include <knewstuff/knewstuffgeneric.h>
#include <knewstuff/engine.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
-#include <qdom.h>
-#include <qlabel.h>
-#include <qtextbrowser.h>
-#include <qtimer.h> // hack
+#include <tqlayout.h>
+#include <tqpushbutton.h>
+#include <tqdom.h>
+#include <tqlabel.h>
+#include <tqtextbrowser.h>
+#include <tqtimer.h> // hack
using namespace KNS;
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;
}
@@ -67,21 +67,21 @@ class NumSortListViewItem : 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);
@@ -90,14 +90,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)
{
@@ -111,12 +111,12 @@ void DownloadDialog::init(Engine *engine)
m_engine = engine;
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*)));
}
}
@@ -129,17 +129,17 @@ void DownloadDialog::load()
m_loader->load(m_filter, 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;
+ TQMap<TQWidget*, TQValueList<KListView*>* >::Iterator it;
for(it = m_map.begin(); it != m_map.end(); ++it)
{
- QValueList<KListView*> *v = it.data();
+ TQValueList<KListView*> *v = it.data();
kdDebug() << "clear listviews in " << v << endl;
if(v)
{
@@ -158,7 +158,7 @@ void DownloadDialog::clear()
void DownloadDialog::slotProviders(Provider::List *list)
{
Provider *p;
- /*QFrame *frame;*/
+ /*TQFrame *frame;*/
for(p = list->first(); p; p = list->next())
{
@@ -175,19 +175,19 @@ void DownloadDialog::slotProviders(Provider::List *list)
void DownloadDialog::addProvider(Provider *p)
{
- QFrame *frame;
+ TQFrame *frame;
KTabCtl *ctl;
- QWidget *w_d, *w_r, *w_l;
- QWidget *w2;
+ TQWidget *w_d, *w_r, *w_l;
+ TQWidget *w2;
KListView *lvtmp_r, *lvtmp_d, *lvtmp_l;
- QTextBrowser *rt;
- QString tmp;
+ 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;
}
@@ -196,15 +196,15 @@ void DownloadDialog::addProvider(Provider *p)
ret = true;
if(!p->icon().isValid()) ret = false;
else ret = KIO::NetAccess::download(p->icon(), tmp, this);
- if(ret) pix = QPixmap(tmp);
+ if(ret) pix = TQPixmap(tmp);
else pix = KGlobal::iconLoader()->loadIcon("knewstuff", KIcon::Panel);
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 KTabCtl(frame);
ctl->addTab(w_r, i18n("Highest Rated"));
@@ -212,9 +212,9 @@ void DownloadDialog::addProvider(Provider *p)
ctl->addTab(w_l, i18n("Latest"));
m_curtab = 0;
- connect(ctl, SIGNAL(tabSelected(int)), SLOT(slotTab(int)));
+ connect(ctl, TQT_SIGNAL(tabSelected(int)), TQT_SLOT(slotTab(int)));
- QHBoxLayout *box = new QHBoxLayout(frame);
+ TQHBoxLayout *box = new TQHBoxLayout(frame);
box->add(ctl);
lvtmp_r = new KListView(w_r);
@@ -235,40 +235,40 @@ void DownloadDialog::addProvider(Provider *p)
lvtmp_l->addColumn(i18n("Release Date"));
lvtmp_l->setSorting(2, false);
- connect(lvtmp_r, SIGNAL(selectionChanged()), SLOT(slotSelected()));
- connect(lvtmp_d, SIGNAL(selectionChanged()), SLOT(slotSelected()));
- connect(lvtmp_l, SIGNAL(selectionChanged()), SLOT(slotSelected()));
+ connect(lvtmp_r, TQT_SIGNAL(selectionChanged()), TQT_SLOT(slotSelected()));
+ connect(lvtmp_d, TQT_SIGNAL(selectionChanged()), TQT_SLOT(slotSelected()));
+ connect(lvtmp_l, TQT_SIGNAL(selectionChanged()), 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(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(lvtmp_r);
- QVBoxLayout *box3 = new QVBoxLayout(w_d);
+ TQVBoxLayout *box3 = new TQVBoxLayout(w_d);
box3->add(lvtmp_d);
- QVBoxLayout *box4 = new QVBoxLayout(w_l);
+ TQVBoxLayout *box4 = new TQVBoxLayout(w_l);
box4->add(lvtmp_l);
- QValueList<KListView*> *v = new QValueList<KListView*>;
+ TQValueList<KListView*> *v = new TQValueList<KListView*>;
*v << lvtmp_r << lvtmp_d << 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;
@@ -277,13 +277,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;
@@ -292,9 +292,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;
@@ -323,8 +323,8 @@ void DownloadDialog::slotResult(KIO::Job *job)
int DownloadDialog::installStatus(Entry *entry)
{
- QDate date;
- QString datestring;
+ TQDate date;
+ TQString datestring;
int installed;
kapp->config()->setGroup("KNewStuffStatus");
@@ -332,7 +332,7 @@ int DownloadDialog::installStatus(Entry *entry)
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;
@@ -343,14 +343,14 @@ int DownloadDialog::installStatus(Entry *entry)
void DownloadDialog::addEntry(Entry *entry)
{
- QPixmap pix;
+ TQPixmap pix;
int installed;
/*if(m_engine)
{
if(m_map.count() == 0)
{
- m_frame = addPage(i18n("Welcome"), i18n("Welcome"), QPixmap(""));
+ m_frame = addPage(i18n("Welcome"), i18n("Welcome"), TQPixmap(""));
Provider *p = new Provider();
p->setName(i18n("Generic"));
addProvider(p);
@@ -361,12 +361,12 @@ void DownloadDialog::addEntry(Entry *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();
KListViewItem *tmp_r = new KListViewItem(lv_r,
- entry->name(), entry->version(), QString("%1").arg(entry->rating()));
+ entry->name(), entry->version(), TQString("%1").arg(entry->rating()));
KListViewItem *tmp_d = new NumSortListViewItem(lv_d,
- entry->name(), entry->version(), QString("%1").arg(entry->downloads()));
+ entry->name(), entry->version(), TQString("%1").arg(entry->downloads()));
KListViewItem *tmp_l = new KListViewItem(lv_l,
entry->name(), entry->version(), KGlobal::locale()->formatDate(entry->releaseDate()));
@@ -379,10 +379,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()
@@ -390,9 +390,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"
@@ -447,7 +447,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*)));
}
}
@@ -457,7 +457,7 @@ 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);
m_entryitem = lv_r->findItem(m_entryname, 0);
if(m_entryitem) m_entryitem->setPixmap(0, pix);
m_entryitem = lv_d->findItem(m_entryname, 0);
@@ -466,7 +466,7 @@ void DownloadDialog::install(Entry *e)
if(m_entryitem) m_entryitem->setPixmap(0, pix);
- QPushButton *in;
+ TQPushButton *in;
in = *(m_buttons[m_page]->at(0));
if(in) in->setEnabled(false);
}
@@ -505,29 +505,29 @@ void DownloadDialog::slotTab(int tab)
void DownloadDialog::slotSelected()
{
- QString tmp;
+ TQString tmp;
bool enabled;
Entry *e = getEntry();
- QString lang = KGlobal::locale()->language();
+ TQString lang = KGlobal::locale()->language();
if(e)
{
if(!e->preview(lang).isValid())
{
- m_rt->setText(QString("<b>%1</b><br>%2<br>%3<br><br><i>%4</i><br>(%5)").arg(
+ m_rt->setText(TQString("<b>%1</b><br>%2<br>%3<br><br><i>%4</i><br>(%5)").arg(
e->name()).arg(e->author()).arg(KGlobal::locale()->formatDate(e->releaseDate())).arg(e->summary(lang)).arg(e->license()));
}
else
{
KIO::NetAccess::download(e->preview(lang), tmp, this);
- m_rt->setText(QString("<b>%1</b><br>%2<br>%3<br><br><img src='%4'><br><i>%5</i><br>(%6)").arg(
+ m_rt->setText(TQString("<b>%1</b><br>%2<br>%3<br><br><img src='%4'><br><i>%5</i><br>(%6)").arg(
e->name()).arg(e->author()).arg(KGlobal::locale()->formatDate(e->releaseDate())).arg(tmp).arg(e->summary(lang)).arg(e->license()));
}
if(installStatus(e) == 1) enabled = false;
else enabled = true;
- QPushButton *de, *in;
+ TQPushButton *de, *in;
in = *(m_buttons[m_page]->at(0));
de = *(m_buttons[m_page]->at(1));
if(in) in->setEnabled(enabled);
@@ -552,7 +552,7 @@ Entry *DownloadDialog::getEntry()
return 0;
}
-void DownloadDialog::slotPage(QWidget *w)
+void DownloadDialog::slotPage(TQWidget *w)
{
Provider *p;
@@ -589,17 +589,17 @@ void DownloadDialog::loadProvider(Provider *p)
m_jobs[job] = p;
- 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)
{
m_providerlist = providerList;
}
@@ -612,7 +612,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);
diff --git a/lib/compatibility/knewstuff/downloaddialog.h b/lib/compatibility/knewstuff/downloaddialog.h
index 34b2b22b..81f88de4 100644
--- a/lib/compatibility/knewstuff/downloaddialog.h
+++ b/lib/compatibility/knewstuff/downloaddialog.h
@@ -66,7 +66,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.
@@ -75,7 +75,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.
@@ -87,8 +87,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
@@ -104,7 +104,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
@@ -114,7 +114,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.
@@ -147,7 +147,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);
/**
Constructor.
@@ -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
/**
@@ -176,7 +176,7 @@ class KDE_EXPORT DownloadDialog : public KDialogBase
@param type a data type such as "korganizer/calendar"
*/
- static void open(QString type);
+ static void open(TQString type);
// ### KDE 4.0: remove and make caption/parent argument optional
public slots:
@@ -193,13 +193,13 @@ 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(int tab);
void slotSelected();
- void slotPage(QWidget *w);
+ void slotPage(TQWidget *w);
void slotFinish();
private:
@@ -210,25 +210,25 @@ class KDE_EXPORT DownloadDialog : public KDialogBase
int installStatus(Entry *e);
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;
- QString m_providerlist;
+ 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;
+ TQString m_providerlist;
Engine *m_engine;
- QWidget *m_page;
+ TQWidget *m_page;
};
}
diff --git a/lib/compatibility/knewstuff/engine.cpp b/lib/compatibility/knewstuff/engine.cpp
index c141aeeb..ace0b75e 100644
--- a/lib/compatibility/knewstuff/engine.cpp
+++ b/lib/compatibility/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>
@@ -39,8 +39,8 @@
using namespace KNS;
-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 ),
mNewStuff( newStuff ), mType( type )
@@ -50,8 +50,8 @@ Engine::Engine( KNewStuff *newStuff, const QString &type,
mNewStuffList.setAutoDelete( true );
}
-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 ),
@@ -75,8 +75,8 @@ void Engine::download()
kdDebug(5850) << "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 );
}
@@ -97,25 +97,25 @@ void Engine::getMetaInformation( Provider::List *providers )
if ( p->downloadUrl().isEmpty() ) continue;
KIO::TransferJob *job = KIO::get( p->downloadUrl() );
- 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(5850) << "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 )
@@ -124,25 +124,25 @@ void Engine::slotNewStuffJobResult( KIO::Job *job )
kdDebug(5850) << "Error downloading new stuff descriptions." << endl;
job->showErrorDialog( mParentWidget );
} else {
- QString knewstuffDoc = mNewStuffJobData[ job ];
+ TQString knewstuffDoc = mNewStuffJobData[ job ];
kdDebug(5850) << "---START---" << endl << knewstuffDoc << "---END---" << endl;
mDownloadDialog->addProvider( mProviderJobs[ job ] );
- QDomDocument doc;
+ TQDomDocument doc;
if ( !doc.setContent( knewstuffDoc ) ) {
kdDebug(5850) << "Error parsing knewstuff.xml." << endl;
return;
} else {
- QDomElement knewstuff = doc.documentElement();
+ TQDomElement knewstuff = doc.documentElement();
if ( knewstuff.isNull() ) {
kdDebug(5850) << "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;
@@ -193,8 +193,8 @@ void Engine::download( Entry *entry )
kdDebug(5850) << " 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 )
@@ -217,14 +217,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 );
}
@@ -264,7 +264,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 ( !mNewStuff->createUploadFile( mUploadFile ) ) {
KMessageBox::error( mParentWidget, i18n("Unable to create file to upload.") );
@@ -273,8 +273,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 ) ) {
@@ -282,7 +282,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) );
@@ -291,7 +291,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();
@@ -314,8 +314,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 );
}
@@ -324,10 +324,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());
@@ -338,17 +338,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();
@@ -370,14 +370,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 )
@@ -389,19 +389,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(5850) << "Error uploading new stuff metadata." << endl;
job->showErrorDialog( mParentWidget );
diff --git a/lib/compatibility/knewstuff/engine.h b/lib/compatibility/knewstuff/engine.h
index dd3f2b30..42f86e64 100644
--- a/lib/compatibility/knewstuff/engine.h
+++ b/lib/compatibility/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"
@@ -59,7 +59,7 @@ class 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.
@@ -68,7 +68,7 @@ class 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.
@@ -80,14 +80,14 @@ class 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
@@ -102,7 +102,7 @@ class 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.
@@ -142,7 +142,7 @@ class 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 );
@@ -155,31 +155,31 @@ class 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;
KNewStuff *mNewStuff;
- QString mType;
+ TQString mType;
bool mIgnoreInstallResult;
};
diff --git a/lib/compatibility/knewstuff/entry.cpp b/lib/compatibility/knewstuff/entry.cpp
index 1d4f7e72..ef9d3a88 100644
--- a/lib/compatibility/knewstuff/entry.cpp
+++ b/lib/compatibility/knewstuff/entry.cpp
@@ -26,12 +26,12 @@
using namespace KNS;
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 )
{
parseDomElement( e );
}
@@ -41,78 +41,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;
}
@@ -129,33 +129,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());
}
@@ -163,22 +163,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());
}
@@ -207,43 +207,43 @@ int Entry::downloads()
return mDownloads;
}
-QString Entry::fullName()
+TQString Entry::fullName()
{
- 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" ) setName( e.text().stripWhiteSpace() );
if ( e.tagName() == "author" ) setAuthor( e.text().stripWhiteSpace() );
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() );
@@ -251,10 +251,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 );
@@ -262,17 +262,17 @@ QDomElement Entry::createDomElement( QDomDocument &doc,
addElement( doc, entry, "author", author() );
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 );
@@ -283,10 +283,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/lib/compatibility/knewstuff/entry.h b/lib/compatibility/knewstuff/entry.h
index 3a16964d..a3c816a1 100644
--- a/lib/compatibility/knewstuff/entry.h
+++ b/lib/compatibility/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,75 +58,75 @@ class KDE_EXPORT Entry
/**
* Sets the (unique) name for this data object.
*/
- void setName( const QString & );
+ void setName( const TQString & );
/**
* Retrieve the name of the data object.
*
* @return object name
*/
- QString name() const;
+ TQString name() 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 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
@@ -144,41 +144,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).
@@ -214,42 +214,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/lib/compatibility/knewstuff/knewstuff.cpp b/lib/compatibility/knewstuff/knewstuff.cpp
index 5387e647..6a37aa61 100644
--- a/lib/compatibility/knewstuff/knewstuff.cpp
+++ b/lib/compatibility/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/lib/compatibility/knewstuff/knewstuff.h b/lib/compatibility/knewstuff/knewstuff.h
index 9d2d10ed..2f266a0b 100644
--- a/lib/compatibility/knewstuff/knewstuff.h
+++ b/lib/compatibility/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;
-KAction* standardAction(const QString& what,
- const QObject *recvr,
+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/lib/compatibility/knewstuff/knewstuffgeneric.cpp b/lib/compatibility/knewstuff/knewstuffgeneric.cpp
index 22673dac..51305f62 100644
--- a/lib/compatibility/knewstuff/knewstuffgeneric.cpp
+++ b/lib/compatibility/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(5850) << "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(5850) << "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(5850) << "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,20 +80,20 @@ 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;
+ TQString path, file, target;
mConfig->setGroup("KNewStuff");
if( entry ) target = entry->fullName();
else target = "/";
- QString res = mConfig->readEntry( "StandardResource" );
+ TQString res = mConfig->readEntry( "StandardResource" );
if ( res.isEmpty() )
{
target = mConfig->readEntry("TargetDir");
@@ -110,13 +110,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();
}
else file = locateLocal( res.utf8() , target );
@@ -124,16 +124,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 override 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/lib/compatibility/knewstuff/knewstuffgeneric.h b/lib/compatibility/knewstuff/knewstuffgeneric.h
index 5443e24a..6347bf53 100644
--- a/lib/compatibility/knewstuff/knewstuffgeneric.h
+++ b/lib/compatibility/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/lib/compatibility/knewstuff/knewstuffsecure.cpp b/lib/compatibility/knewstuff/knewstuffsecure.cpp
index 270d9449..f68be7ae 100644
--- a/lib/compatibility/knewstuff/knewstuffsecure.cpp
+++ b/lib/compatibility/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/lib/compatibility/knewstuff/knewstuffsecure.h b/lib/compatibility/knewstuff/knewstuffsecure.h
index 2aed131a..1a6bc44a 100644
--- a/lib/compatibility/knewstuff/knewstuffsecure.h
+++ b/lib/compatibility/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/lib/compatibility/knewstuff/provider.cpp b/lib/compatibility/knewstuff/provider.cpp
index 2ab48f18..ca7767e0 100644
--- a/lib/compatibility/knewstuff/provider.cpp
+++ b/lib/compatibility/knewstuff/provider.cpp
@@ -34,7 +34,7 @@ Provider::Provider() : mNoUpload( false )
{
}
-Provider::Provider( const QDomElement &e ) : mNoUpload( false )
+Provider::Provider( const TQDomElement &e ) : mNoUpload( false )
{
parseDomElement( e );
}
@@ -44,12 +44,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;
}
@@ -110,7 +110,7 @@ bool Provider::noUpload() const
}
-void Provider::parseDomElement( const QDomElement &element )
+void Provider::parseDomElement( const TQDomElement &element )
{
if ( element.tagName() != "provider" ) return;
@@ -119,21 +119,21 @@ void Provider::parseDomElement( const QDomElement &element )
setNoUploadUrl( KURL( element.attribute("nouploadurl") ) );
setIcon( KURL( element.attribute("icon") ) );
- 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 );
@@ -141,13 +141,13 @@ QDomElement Provider::createDomElement( QDomDocument &doc, QDomElement &parent )
}
-ProviderLoader::ProviderLoader( QWidget *parentWidget ) :
+ProviderLoader::ProviderLoader( TQWidget *parentWidget ) :
mParentWidget( parentWidget )
{
mProviders.setAutoDelete( true );
}
-void ProviderLoader::load( const QString &type, const QString &providersList )
+void ProviderLoader::load( const TQString &type, const TQString &providersList )
{
kdDebug(5850) << "ProviderLoader::load()" << endl;
@@ -157,13 +157,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";
@@ -172,23 +172,23 @@ void ProviderLoader::load( const QString &type, const QString &providersList )
kdDebug(5850) << "ProviderLoader::load(): providersUrl: " << providersUrl << endl;
KIO::TransferJob *job = KIO::get( KURL( providersUrl ) );
- 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(5850) << "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 )
@@ -200,21 +200,21 @@ void ProviderLoader::slotJobResult( KIO::Job *job )
kdDebug(5850) << "--PROVIDERS-START--" << endl << mJobData << "--PROV_END--"
<< endl;
- QDomDocument doc;
+ TQDomDocument doc;
if ( !doc.setContent( mJobData ) ) {
KMessageBox::error( mParentWidget, i18n("Error parsing providers list.") );
return;
}
- QDomElement providers = doc.documentElement();
+ TQDomElement providers = doc.documentElement();
if ( providers.isNull() ) {
kdDebug(5850) << "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();
mProviders.append( new Provider( p ) );
}
diff --git a/lib/compatibility/knewstuff/provider.h b/lib/compatibility/knewstuff/provider.h
index 69898bc4..f878175a 100644
--- a/lib/compatibility/knewstuff/provider.h
+++ b/lib/compatibility/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 Provider
{
public:
- typedef QPtrList<Provider> List;
+ typedef TQPtrList<Provider> List;
/**
* Constructor.
@@ -56,7 +56,7 @@ class Provider
/**
* Constructor with XML feed.
*/
- Provider( const QDomElement & );
+ Provider( const TQDomElement & );
/**
* Destructor.
@@ -66,14 +66,14 @@ class 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.
@@ -142,12 +142,12 @@ class 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;
@@ -170,7 +170,7 @@ class ProviderLoader : public QObject
*
* @param parentWidget the parent widget
*/
- ProviderLoader( QWidget *parentWidget );
+ ProviderLoader( TQWidget *parentWidget );
/**
* Starts asynchronously loading the list of providers of the
@@ -181,7 +181,7 @@ class 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:
/**
@@ -190,13 +190,13 @@ class 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/lib/compatibility/knewstuff/providerdialog.cpp b/lib/compatibility/knewstuff/providerdialog.cpp
index 00374a34..a6625870 100644
--- a/lib/compatibility/knewstuff/providerdialog.cpp
+++ b/lib/compatibility/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/lib/compatibility/knewstuff/providerdialog.h b/lib/compatibility/knewstuff/providerdialog.h
index c75cc3a1..3e02e30a 100644
--- a/lib/compatibility/knewstuff/providerdialog.h
+++ b/lib/compatibility/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/lib/compatibility/knewstuff/security.cpp b/lib/compatibility/knewstuff/security.cpp
index f7099c72..8ef377b7 100644
--- a/lib/compatibility/knewstuff/security.cpp
+++ b/lib/compatibility/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/lib/compatibility/knewstuff/security.h b/lib/compatibility/knewstuff/security.h
index 5eea64ae..d5e9299c 100644
--- a/lib/compatibility/knewstuff/security.h
+++ b/lib/compatibility/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/lib/compatibility/knewstuff/uploaddialog.cpp b/lib/compatibility/knewstuff/uploaddialog.cpp
index 5116785d..163ed4ba 100644
--- a/lib/compatibility/knewstuff/uploaddialog.cpp
+++ b/lib/compatibility/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>
@@ -42,78 +42,78 @@
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 *versionLabel = new QLabel( i18n("Version:"), topPage );
+ TQLabel *versionLabel = new TQLabel( i18n("Version:"), topPage );
topLayout->addWidget( versionLabel, 2, 0 );
- mVersionEdit = new QLineEdit( topPage );
+ mVersionEdit = new TQLineEdit( topPage );
topLayout->addWidget( mVersionEdit, 2, 1 );
- QLabel *releaseLabel = new QLabel( i18n("Release:"), topPage );
+ TQLabel *releaseLabel = new TQLabel( i18n("Release:"), topPage );
topLayout->addWidget( releaseLabel, 3, 0 );
- mReleaseSpin = new QSpinBox( topPage );
+ mReleaseSpin = new TQSpinBox( topPage );
mReleaseSpin->setMinValue( 1 );
topLayout->addWidget( mReleaseSpin, 3, 1 );
- QLabel *licenceLabel = new QLabel( i18n("License:"), topPage );
+ TQLabel *licenceLabel = new TQLabel( i18n("License:"), topPage );
topLayout->addWidget( licenceLabel, 4, 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, 4, 1 );
- QLabel *languageLabel = new QLabel( i18n("Language:"), topPage );
+ TQLabel *languageLabel = new TQLabel( i18n("Language:"), topPage );
topLayout->addWidget( languageLabel, 5, 0 );
- mLanguageCombo = new QComboBox( topPage );
+ mLanguageCombo = new TQComboBox( topPage );
topLayout->addWidget( mLanguageCombo, 5, 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, 6, 0 );
mPreviewUrl = new KURLRequester( topPage );
topLayout->addWidget( mPreviewUrl, 6, 1 );
- QLabel *summaryLabel = new QLabel( i18n("Summary:"), topPage );
+ TQLabel *summaryLabel = new TQLabel( i18n("Summary:"), topPage );
topLayout->addMultiCellWidget( summaryLabel, 7, 7, 0, 1 );
mSummaryEdit = new KTextEdit( topPage );
topLayout->addMultiCellWidget( mSummaryEdit, 8, 8, 0, 1 );
KConfig *conf = kapp->config();
conf->setGroup("KNewStuffUpload");
- QString name = conf->readEntry("name");
- QString author = conf->readEntry("author");
- 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");
+ TQString name = conf->readEntry("name");
+ TQString author = conf->readEntry("author");
+ 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");
if(!name.isNull())
{
- int prefill = KMessageBox::questionYesNo(this, i18n("Old upload information found, fill out fields?"), QString::null, i18n("Fill Out Fields"), i18n("Do Not Fill Out"));
+ int prefill = KMessageBox::questionYesNo(this, i18n("Old upload information found, fill out fields?"), TQString::null, i18n("Fill Out Fields"), i18n("Do Not Fill Out"));
if(prefill == KMessageBox::Yes)
{
mNameEdit->setText(name);
@@ -169,7 +169,7 @@ void UploadDialog::slotOk()
accept();
}
-void UploadDialog::setPreviewFile( const QString &previewFile )
+void UploadDialog::setPreviewFile( const TQString &previewFile )
{
mPreviewUrl->setURL( previewFile );
}
diff --git a/lib/compatibility/knewstuff/uploaddialog.h b/lib/compatibility/knewstuff/uploaddialog.h
index 8e962ccb..a289da11 100644
--- a/lib/compatibility/knewstuff/uploaddialog.h
+++ b/lib/compatibility/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 );
protected slots:
void slotOk();
@@ -75,16 +75,16 @@ class UploadDialog : public KDialogBase
private:
Engine *mEngine;
- QLineEdit *mNameEdit;
- QLineEdit *mAuthorEdit;
- QLineEdit *mVersionEdit;
- QSpinBox *mReleaseSpin;
+ TQLineEdit *mNameEdit;
+ TQLineEdit *mAuthorEdit;
+ TQLineEdit *mVersionEdit;
+ TQSpinBox *mReleaseSpin;
KURLRequester *mPreviewUrl;
- QTextEdit *mSummaryEdit;
- QComboBox *mLanguageCombo;
- QComboBox *mLicenceCombo;
+ TQTextEdit *mSummaryEdit;
+ TQComboBox *mLanguageCombo;
+ TQComboBox *mLicenceCombo;
- QPtrList<Entry> mEntryList;
+ TQPtrList<Entry> mEntryList;
};
}