summaryrefslogtreecommitdiffstats
path: root/lib/compatibility/knewstuff
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-01-24 13:51:30 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-01-24 13:51:30 -0600
commit29df04c24350cc76a41e2410d1c92445f9338b98 (patch)
treec2b9cde128e24275393a83d9eaec58b2ef12d109 /lib/compatibility/knewstuff
parentc70534eef6085384ef7ddff369a154dbc8901917 (diff)
downloadtdewebdev-29df04c24350cc76a41e2410d1c92445f9338b98.tar.gz
tdewebdev-29df04c24350cc76a41e2410d1c92445f9338b98.zip
Rename KGlobal, KProcess, and KClipboard to avoid conflicts with KDE4
Diffstat (limited to 'lib/compatibility/knewstuff')
-rw-r--r--lib/compatibility/knewstuff/downloaddialog.cpp20
-rw-r--r--lib/compatibility/knewstuff/downloaddialog.h2
-rw-r--r--lib/compatibility/knewstuff/entry.cpp6
-rw-r--r--lib/compatibility/knewstuff/knewstuff.cpp2
-rw-r--r--lib/compatibility/knewstuff/knewstuffgeneric.cpp6
-rw-r--r--lib/compatibility/knewstuff/knewstuffsecure.cpp4
-rw-r--r--lib/compatibility/knewstuff/provider.cpp2
-rw-r--r--lib/compatibility/knewstuff/provider.h2
-rw-r--r--lib/compatibility/knewstuff/security.cpp18
-rw-r--r--lib/compatibility/knewstuff/security.h4
-rw-r--r--lib/compatibility/knewstuff/uploaddialog.cpp2
11 files changed, 34 insertions, 34 deletions
diff --git a/lib/compatibility/knewstuff/downloaddialog.cpp b/lib/compatibility/knewstuff/downloaddialog.cpp
index f1942f7f..d2516134 100644
--- a/lib/compatibility/knewstuff/downloaddialog.cpp
+++ b/lib/compatibility/knewstuff/downloaddialog.cpp
@@ -197,7 +197,7 @@ void DownloadDialog::addProvider(Provider *p)
if(!p->icon().isValid()) ret = false;
else ret = KIO::NetAccess::download(p->icon(), tmp, this);
if(ret) pix = TQPixmap(tmp);
- else pix = KGlobal::iconLoader()->loadIcon("knewstuff", KIcon::Panel);
+ else pix = TDEGlobal::iconLoader()->loadIcon("knewstuff", KIcon::Panel);
frame = addPage(p->name(), p->name(), pix);
m_frame = frame;
@@ -359,8 +359,8 @@ void DownloadDialog::addEntry(Entry *entry)
}*/
installed = installStatus(entry);
- if(installed > 0) pix = KGlobal::iconLoader()->loadIcon("ok", KIcon::Small);
- else if(installed < 0) pix = KGlobal::iconLoader()->loadIcon("history", KIcon::Small);
+ if(installed > 0) pix = TDEGlobal::iconLoader()->loadIcon("ok", KIcon::Small);
+ else if(installed < 0) pix = TDEGlobal::iconLoader()->loadIcon("history", KIcon::Small);
else pix = TQPixmap();
KListViewItem *tmp_r = new KListViewItem(lv_r,
@@ -368,7 +368,7 @@ void DownloadDialog::addEntry(Entry *entry)
KListViewItem *tmp_d = new NumSortListViewItem(lv_d,
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()));
+ entry->name(), entry->version(), TDEGlobal::locale()->formatDate(entry->releaseDate()));
tmp_r->setPixmap(0, pix);
tmp_d->setPixmap(0, pix);
@@ -390,7 +390,7 @@ void DownloadDialog::slotDetails()
Entry *e = getEntry();
if(!e) return;
- TQString lang = KGlobal::locale()->language();
+ TQString lang = TDEGlobal::locale()->language();
TQString info = i18n
(
@@ -410,7 +410,7 @@ void DownloadDialog::slotDetails()
).arg(e->release()
).arg(e->rating()
).arg(e->downloads()
- ).arg(KGlobal::locale()->formatDate(e->releaseDate())
+ ).arg(TDEGlobal::locale()->formatDate(e->releaseDate())
).arg(e->summary(lang)
);
@@ -457,7 +457,7 @@ void DownloadDialog::install(Entry *e)
kapp->config()->writeEntry(m_entryname, e->releaseDate().toString(Qt::ISODate));
kapp->config()->sync();
- TQPixmap pix = KGlobal::iconLoader()->loadIcon("ok", KIcon::Small);
+ TQPixmap pix = TDEGlobal::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);
@@ -508,20 +508,20 @@ void DownloadDialog::slotSelected()
TQString tmp;
bool enabled;
Entry *e = getEntry();
- TQString lang = KGlobal::locale()->language();
+ TQString lang = TDEGlobal::locale()->language();
if(e)
{
if(!e->preview(lang).isValid())
{
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()));
+ e->name()).arg(e->author()).arg(TDEGlobal::locale()->formatDate(e->releaseDate())).arg(e->summary(lang)).arg(e->license()));
}
else
{
KIO::NetAccess::download(e->preview(lang), tmp, this);
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()));
+ e->name()).arg(e->author()).arg(TDEGlobal::locale()->formatDate(e->releaseDate())).arg(tmp).arg(e->summary(lang)).arg(e->license()));
}
if(installStatus(e) == 1) enabled = false;
diff --git a/lib/compatibility/knewstuff/downloaddialog.h b/lib/compatibility/knewstuff/downloaddialog.h
index e54371aa..2a0b729d 100644
--- a/lib/compatibility/knewstuff/downloaddialog.h
+++ b/lib/compatibility/knewstuff/downloaddialog.h
@@ -112,7 +112,7 @@ class KDE_EXPORT DownloadDialog : public KDialogBase
a previously set type.
@param providerList the URl to the list of providers; if empty
- we first try the ProvidersUrl from KGlobal::config, then we
+ we first try the ProvidersUrl from TDEGlobal::config, then we
fall back to a hardcoded value.
*/
void load(TQString providerList); // KDE4: merge with load() above
diff --git a/lib/compatibility/knewstuff/entry.cpp b/lib/compatibility/knewstuff/entry.cpp
index b7149428..e2390266 100644
--- a/lib/compatibility/knewstuff/entry.cpp
+++ b/lib/compatibility/knewstuff/entry.cpp
@@ -98,7 +98,7 @@ TQString Entry::summary( const TQString &lang ) const
if ( !mSummaryMap[ lang ].isEmpty() ) return mSummaryMap[ lang ];
else {
- TQStringList langs = KGlobal::locale()->languageList();
+ TQStringList langs = TDEGlobal::locale()->languageList();
for(TQStringList::Iterator it = langs.begin(); it != langs.end(); ++it)
if( !mSummaryMap[ *it ].isEmpty() ) return mSummaryMap[ *it ];
}
@@ -151,7 +151,7 @@ KURL Entry::payload( const TQString &lang ) const
{
KURL payload = mPayloadMap[ lang ];
if ( payload.isEmpty() ) {
- TQStringList langs = KGlobal::locale()->languageList();
+ TQStringList langs = TDEGlobal::locale()->languageList();
for(TQStringList::Iterator it = langs.begin(); it != langs.end(); ++it)
if( !mPayloadMap[ *it ].isEmpty() ) return mPayloadMap[ *it ];
}
@@ -174,7 +174,7 @@ KURL Entry::preview( const TQString &lang ) const
{
KURL preview = mPreviewMap[ lang ];
if ( preview.isEmpty() ) {
- TQStringList langs = KGlobal::locale()->languageList();
+ TQStringList langs = TDEGlobal::locale()->languageList();
for(TQStringList::Iterator it = langs.begin(); it != langs.end(); ++it)
if( !mPreviewMap[ *it ].isEmpty() ) return mPreviewMap[ *it ];
}
diff --git a/lib/compatibility/knewstuff/knewstuff.cpp b/lib/compatibility/knewstuff/knewstuff.cpp
index c572f347..6bfbb333 100644
--- a/lib/compatibility/knewstuff/knewstuff.cpp
+++ b/lib/compatibility/knewstuff/knewstuff.cpp
@@ -71,7 +71,7 @@ void KNewStuff::download()
TQString KNewStuff::downloadDestination( Entry * )
{
- return KGlobal::dirs()->saveLocation( "tmp" ) +
+ return TDEGlobal::dirs()->saveLocation( "tmp" ) +
TDEApplication::randomString( 10 );
}
diff --git a/lib/compatibility/knewstuff/knewstuffgeneric.cpp b/lib/compatibility/knewstuff/knewstuffgeneric.cpp
index fb3e788a..163d9ade 100644
--- a/lib/compatibility/knewstuff/knewstuffgeneric.cpp
+++ b/lib/compatibility/knewstuff/knewstuffgeneric.cpp
@@ -40,7 +40,7 @@ using namespace std;
KNewStuffGeneric::KNewStuffGeneric( const TQString &type, TQWidget *parent )
: KNewStuff( type, parent )
{
- mConfig = KGlobal::config();
+ mConfig = TDEGlobal::config();
}
KNewStuffGeneric::~KNewStuffGeneric()
@@ -72,9 +72,9 @@ bool KNewStuffGeneric::install( const TQString &fileName )
for ( TQStringList::iterator it = list.begin(); it != list.end(); ++it) {
list2 << (*it).replace("%f", fileName);
}
- KProcess proc;
+ TDEProcess proc;
proc << list2;
- proc.start( KProcess::Block );
+ proc.start( TDEProcess::Block );
}
return true;
diff --git a/lib/compatibility/knewstuff/knewstuffsecure.cpp b/lib/compatibility/knewstuff/knewstuffsecure.cpp
index 7b98dbba..8e408e2d 100644
--- a/lib/compatibility/knewstuff/knewstuffsecure.cpp
+++ b/lib/compatibility/knewstuff/knewstuffsecure.cpp
@@ -144,7 +144,7 @@ void KNewStuffSecure::slotValidated(int result)
emit installFinished();
} else
{
- KConfig *cfg = KGlobal::config();
+ KConfig *cfg = TDEGlobal::config();
cfg->deleteGroup("KNewStuffStatus");
cfg->setGroup("KNewStuffStatus");
for (TQMap<TQString, TQString>::ConstIterator it = m_installedResources.constBegin(); it != m_installedResources.constEnd(); ++it)
@@ -159,7 +159,7 @@ void KNewStuffSecure::slotValidated(int result)
void KNewStuffSecure::downloadResource()
{
- KConfig *cfg = KGlobal::config();
+ KConfig *cfg = TDEGlobal::config();
m_installedResources = cfg->entryMap("KNewStuffStatus");
engine()->ignoreInstallResult(true);
KNewStuff::download();
diff --git a/lib/compatibility/knewstuff/provider.cpp b/lib/compatibility/knewstuff/provider.cpp
index ca7767e0..67a44ebd 100644
--- a/lib/compatibility/knewstuff/provider.cpp
+++ b/lib/compatibility/knewstuff/provider.cpp
@@ -154,7 +154,7 @@ void ProviderLoader::load( const TQString &type, const TQString &providersList )
mProviders.clear();
mJobData = "";
- KConfig *cfg = KGlobal::config();
+ KConfig *cfg = TDEGlobal::config();
cfg->setGroup("KNewStuff");
TQString providersUrl = providersList;
diff --git a/lib/compatibility/knewstuff/provider.h b/lib/compatibility/knewstuff/provider.h
index eb6669d2..268bd92b 100644
--- a/lib/compatibility/knewstuff/provider.h
+++ b/lib/compatibility/knewstuff/provider.h
@@ -179,7 +179,7 @@ class ProviderLoader : public TQObject
*
* @param type data type such as 'kdesktop/wallpaper'.
* @param providerList the URl to the list of providers; if empty
- * we first try the ProvidersUrl from KGlobal::config, then we
+ * we first try the ProvidersUrl from TDEGlobal::config, then we
* fall back to a hardcoded value.
*/
void load( const TQString &type, const TQString &providerList = TQString() );
diff --git a/lib/compatibility/knewstuff/security.cpp b/lib/compatibility/knewstuff/security.cpp
index 8ef377b7..941081b7 100644
--- a/lib/compatibility/knewstuff/security.cpp
+++ b/lib/compatibility/knewstuff/security.cpp
@@ -57,9 +57,9 @@ void Security::readKeys()
m_keys.clear();
KProcIO *readProcess=new KProcIO();
*readProcess << "gpg"<<"--no-secmem-warning"<<"--no-tty"<<"--with-colon"<<"--list-keys";
- connect(readProcess, TQT_SIGNAL(processExited(KProcess *)), this, TQT_SLOT(slotProcessExited(KProcess *)));
+ connect(readProcess, TQT_SIGNAL(processExited(TDEProcess *)), this, TQT_SLOT(slotProcessExited(TDEProcess *)));
connect(readProcess, TQT_SIGNAL(readReady(KProcIO *)) ,this, TQT_SLOT(slotDataArrived(KProcIO *)));
- if (!readProcess->start(KProcess::NotifyOnExit, true))
+ if (!readProcess->start(TDEProcess::NotifyOnExit, true))
KMessageBox::error(0L, i18n("<qt>Cannot start <i>gpg</i> and retrieve the available keys. Make sure that <i>gpg</i> is installed, otherwise verification of downloaded resources will not be possible.</qt>"));
else
m_gpgRunning = true;
@@ -75,13 +75,13 @@ void Security::readSecretKeys()
m_runMode = ListSecret;
KProcIO *readProcess=new KProcIO();
*readProcess << "gpg"<<"--no-secmem-warning"<<"--no-tty"<<"--with-colon"<<"--list-secret-keys";
- connect(readProcess, TQT_SIGNAL(processExited(KProcess *)), this, TQT_SLOT(slotProcessExited(KProcess *)));
+ connect(readProcess, TQT_SIGNAL(processExited(TDEProcess *)), this, TQT_SLOT(slotProcessExited(TDEProcess *)));
connect(readProcess, TQT_SIGNAL(readReady(KProcIO *)) ,this, TQT_SLOT(slotDataArrived(KProcIO *)));
- if (readProcess->start(KProcess::NotifyOnExit, true))
+ if (readProcess->start(TDEProcess::NotifyOnExit, true))
m_gpgRunning = true;
}
-void Security::slotProcessExited(KProcess *process)
+void Security::slotProcessExited(TDEProcess *process)
{
switch (m_runMode)
{
@@ -248,9 +248,9 @@ void Security::slotCheckValidity()
//verify the signature
KProcIO *verifyProcess=new KProcIO();
*verifyProcess<<"gpg"<<"--no-secmem-warning"<<"--status-fd=2"<<"--command-fd=0"<<"--verify" << f.dirPath() + "/signature"<< m_fileName;
- connect(verifyProcess, TQT_SIGNAL(processExited(KProcess *)),this, TQT_SLOT(slotProcessExited(KProcess *)));
+ connect(verifyProcess, TQT_SIGNAL(processExited(TDEProcess *)),this, TQT_SLOT(slotProcessExited(TDEProcess *)));
connect(verifyProcess, TQT_SIGNAL(readReady(KProcIO *)),this, TQT_SLOT(slotDataArrived(KProcIO *)));
- if (verifyProcess->start(KProcess::NotifyOnExit,true))
+ if (verifyProcess->start(TDEProcess::NotifyOnExit,true))
m_gpgRunning = true;
else
{
@@ -328,10 +328,10 @@ void Security::slotSignFile()
//verify the signature
KProcIO *signProcess=new KProcIO();
*signProcess<<"gpg"<<"--no-secmem-warning"<<"--status-fd=2"<<"--command-fd=0"<<"--no-tty"<<"--detach-sign" << "-u" << m_secretKey << "-o" << f.dirPath() + "/signature" << m_fileName;
- connect(signProcess, TQT_SIGNAL(processExited(KProcess *)),this, TQT_SLOT(slotProcessExited(KProcess *)));
+ connect(signProcess, TQT_SIGNAL(processExited(TDEProcess *)),this, TQT_SLOT(slotProcessExited(TDEProcess *)));
connect(signProcess, TQT_SIGNAL(readReady(KProcIO *)),this, TQT_SLOT(slotDataArrived(KProcIO *)));
m_runMode = Sign;
- if (signProcess->start(KProcess::NotifyOnExit,true))
+ if (signProcess->start(TDEProcess::NotifyOnExit,true))
m_gpgRunning = true;
else
{
diff --git a/lib/compatibility/knewstuff/security.h b/lib/compatibility/knewstuff/security.h
index 34ad6444..dd6e0a6c 100644
--- a/lib/compatibility/knewstuff/security.h
+++ b/lib/compatibility/knewstuff/security.h
@@ -22,7 +22,7 @@
#include <tqobject.h>
class KProcIO;
-class KProcess;
+class TDEProcess;
struct KeyStruct {
TQString id;
@@ -121,7 +121,7 @@ private:
TQString m_secretKey; /// the key used for signing
private slots:
- void slotProcessExited(KProcess *process);
+ void slotProcessExited(TDEProcess *process);
void slotDataArrived(KProcIO *process);
signals:
diff --git a/lib/compatibility/knewstuff/uploaddialog.cpp b/lib/compatibility/knewstuff/uploaddialog.cpp
index 4eaed4aa..12261d71 100644
--- a/lib/compatibility/knewstuff/uploaddialog.cpp
+++ b/lib/compatibility/knewstuff/uploaddialog.cpp
@@ -88,7 +88,7 @@ UploadDialog::UploadDialog( Engine *engine, TQWidget *parent ) :
topLayout->addWidget( languageLabel, 5, 0 );
mLanguageCombo = new TQComboBox( topPage );
topLayout->addWidget( mLanguageCombo, 5, 1 );
- mLanguageCombo->insertStringList( KGlobal::locale()->languageList() );
+ mLanguageCombo->insertStringList( TDEGlobal::locale()->languageList() );
TQLabel *previewLabel = new TQLabel( i18n("Preview URL:"), topPage );
topLayout->addWidget( previewLabel, 6, 0 );