summaryrefslogtreecommitdiffstats
path: root/knewstuff
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-01-24 13:47:22 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-01-24 13:47:22 -0600
commit28edc0aa2ab09297288186f5bc15765eb7be58c0 (patch)
tree7b7a01768b3781763186c825af21bb14717d2c32 /knewstuff
parent07c48c43ff72c237e4028154f4594102b798073f (diff)
downloadtdelibs-28edc0aa2ab09297288186f5bc15765eb7be58c0.tar.gz
tdelibs-28edc0aa2ab09297288186f5bc15765eb7be58c0.zip
Rename KGlobal, KProcess, and KClipboard to avoid conflicts with KDE4
Diffstat (limited to 'knewstuff')
-rw-r--r--knewstuff/downloaddialog.cpp32
-rw-r--r--knewstuff/downloaddialog.h2
-rw-r--r--knewstuff/entry.cpp8
-rw-r--r--knewstuff/knewstuff.cpp2
-rw-r--r--knewstuff/knewstuffbutton.h2
-rw-r--r--knewstuff/knewstuffgeneric.cpp6
-rw-r--r--knewstuff/knewstuffsecure.cpp4
-rw-r--r--knewstuff/provider.cpp2
-rw-r--r--knewstuff/provider.h2
-rw-r--r--knewstuff/security.cpp18
-rw-r--r--knewstuff/security.h4
-rw-r--r--knewstuff/testnewstuff.cpp4
-rw-r--r--knewstuff/uploaddialog.cpp2
13 files changed, 44 insertions, 44 deletions
diff --git a/knewstuff/downloaddialog.cpp b/knewstuff/downloaddialog.cpp
index e8e2bfb3f..6a54e3a78 100644
--- a/knewstuff/downloaddialog.cpp
+++ b/knewstuff/downloaddialog.cpp
@@ -88,7 +88,7 @@ class DateSortListViewItem : public KListViewItem
if (col == 2)
{
TQString s;
- TQDate date = KGlobal::locale()->readDate(text(col));
+ TQDate date = TDEGlobal::locale()->readDate(text(col));
s.sprintf("%08d", date.year() * 366 + date.dayOfYear());
return s;
}
@@ -242,11 +242,11 @@ void DownloadDialog::addProvider(Provider *p)
}
else
{
- pix = KGlobal::iconLoader()->loadIcon(p->icon().path(), KIcon::Panel);
+ pix = TDEGlobal::iconLoader()->loadIcon(p->icon().path(), KIcon::Panel);
ret = true;
}
}
- if(!ret) pix = KGlobal::iconLoader()->loadIcon("knewstuff", KIcon::Panel);
+ if(!ret) pix = TDEGlobal::iconLoader()->loadIcon("knewstuff", KIcon::Panel);
frame = addPage(p->name(), p->name(), pix);
m_frame = frame;
@@ -392,7 +392,7 @@ int DownloadDialog::installStatus(Entry *entry)
TQString datestring;
int installed;
- TQString lang = KGlobal::locale()->language();
+ TQString lang = TDEGlobal::locale()->language();
kapp->config()->setGroup("KNewStuffStatus");
datestring = kapp->config()->readEntry(entry->name(lang));
@@ -415,11 +415,11 @@ void DownloadDialog::addEntry(Entry *entry, const TQStringList& variants)
installed = installStatus(entry);
- if(installed > 0) pix = KGlobal::iconLoader()->loadIcon("ok", KIcon::Small);
- else if(installed < 0) pix = KGlobal::iconLoader()->loadIcon("history", KIcon::Small);
+ if(installed > 0) pix = TDEGlobal::iconLoader()->loadIcon("ok", KIcon::Small);
+ else if(installed < 0) pix = TDEGlobal::iconLoader()->loadIcon("history", KIcon::Small);
else pix = TQPixmap();
- TQString lang = KGlobal::locale()->language();
+ TQString lang = TDEGlobal::locale()->language();
if(variants.contains("score"))
{
@@ -436,7 +436,7 @@ void DownloadDialog::addEntry(Entry *entry, const TQStringList& variants)
if(variants.contains("latest"))
{
KListViewItem *tmp_l = new DateSortListViewItem(lv_l,
- entry->name(lang), entry->version(), KGlobal::locale()->formatDate(entry->releaseDate()));
+ entry->name(lang), entry->version(), TDEGlobal::locale()->formatDate(entry->releaseDate()));
tmp_l->setPixmap(0, pix);
}
@@ -470,7 +470,7 @@ void DownloadDialog::slotDetails()
Entry *e = getEntry();
if(!e) return;
- TQString lang = KGlobal::locale()->language();
+ TQString lang = TDEGlobal::locale()->language();
TQString info = i18n
(
@@ -490,7 +490,7 @@ void DownloadDialog::slotDetails()
).arg(e->release()
).arg(e->rating()
).arg(e->downloads()
- ).arg(KGlobal::locale()->formatDate(e->releaseDate())
+ ).arg(TDEGlobal::locale()->formatDate(e->releaseDate())
).arg(e->summary(lang)
);
@@ -550,9 +550,9 @@ void DownloadDialog::install(Entry *e)
kapp->config()->writeEntry(m_entryname, TQString(e->releaseDate().toString(Qt::ISODate)));
kapp->config()->sync();
- TQPixmap pix = KGlobal::iconLoader()->loadIcon("ok", KIcon::Small);
+ TQPixmap pix = TDEGlobal::iconLoader()->loadIcon("ok", KIcon::Small);
- TQString lang = KGlobal::locale()->language();
+ TQString lang = TDEGlobal::locale()->language();
if(m_entryitem)
{
@@ -640,12 +640,12 @@ void DownloadDialog::slotSelected()
TQString tmp;
bool enabled;
Entry *e = getEntry();
- TQString lang = KGlobal::locale()->language();
+ TQString lang = TDEGlobal::locale()->language();
bool ret;
if(e)
{
- TQString lang = KGlobal::locale()->language();
+ TQString lang = TDEGlobal::locale()->language();
TQListViewItem *item;
if(m_curtab != 0)
@@ -685,7 +685,7 @@ void DownloadDialog::slotSelected()
{
desc += TQString("%1").arg(e->author());
}
- desc += TQString("<br>%1").arg(KGlobal::locale()->formatDate(e->releaseDate()));
+ desc += TQString("<br>%1").arg(TDEGlobal::locale()->formatDate(e->releaseDate()));
desc += TQString("<br><br>");
if(ret)
{
@@ -728,7 +728,7 @@ Entry *DownloadDialog::getEntry()
TQString entryName = entryItem->text(0);
- TQString lang = KGlobal::locale()->language();
+ TQString lang = TDEGlobal::locale()->language();
for(Entry *e = m_entries.first(); e; e = m_entries.next())
if(e->name(lang) == entryName)
diff --git a/knewstuff/downloaddialog.h b/knewstuff/downloaddialog.h
index 2c30ee9ba..1f879d938 100644
--- a/knewstuff/downloaddialog.h
+++ b/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/knewstuff/entry.cpp b/knewstuff/entry.cpp
index 55d60579c..56dd375f4 100644
--- a/knewstuff/entry.cpp
+++ b/knewstuff/entry.cpp
@@ -72,7 +72,7 @@ TQString Entry::name( const TQString &lang ) const
if ( !d(this)->mNameMap[ lang ].isEmpty() ) return d(this)->mNameMap[ lang ];
else {
- TQStringList langs = KGlobal::locale()->languageList();
+ TQStringList langs = TDEGlobal::locale()->languageList();
for(TQStringList::Iterator it = langs.begin(); it != langs.end(); ++it)
if( !d(this)->mNameMap[ *it ].isEmpty() ) return d(this)->mNameMap[ *it ];
}
@@ -175,7 +175,7 @@ TQString Entry::summary( const TQString &lang ) const
if ( !mSummaryMap[ lang ].isEmpty() ) return mSummaryMap[ lang ];
else {
- TQStringList langs = KGlobal::locale()->languageList();
+ TQStringList langs = TDEGlobal::locale()->languageList();
for(TQStringList::Iterator it = langs.begin(); it != langs.end(); ++it)
if( !mSummaryMap[ *it ].isEmpty() ) return mSummaryMap[ *it ];
}
@@ -228,7 +228,7 @@ KURL Entry::payload( const TQString &lang ) const
{
KURL payload = mPayloadMap[ lang ];
if ( payload.isEmpty() ) {
- TQStringList langs = KGlobal::locale()->languageList();
+ TQStringList langs = TDEGlobal::locale()->languageList();
for(TQStringList::Iterator it = langs.begin(); it != langs.end(); ++it)
if( !mPayloadMap[ *it ].isEmpty() ) return mPayloadMap[ *it ];
}
@@ -251,7 +251,7 @@ KURL Entry::preview( const TQString &lang ) const
{
KURL preview = mPreviewMap[ lang ];
if ( preview.isEmpty() ) {
- TQStringList langs = KGlobal::locale()->languageList();
+ TQStringList langs = TDEGlobal::locale()->languageList();
for(TQStringList::Iterator it = langs.begin(); it != langs.end(); ++it)
if( !mPreviewMap[ *it ].isEmpty() ) return mPreviewMap[ *it ];
}
diff --git a/knewstuff/knewstuff.cpp b/knewstuff/knewstuff.cpp
index c572f347d..6bfbb3333 100644
--- a/knewstuff/knewstuff.cpp
+++ b/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/knewstuff/knewstuffbutton.h b/knewstuff/knewstuffbutton.h
index 6935ba653..bebd08297 100644
--- a/knewstuff/knewstuffbutton.h
+++ b/knewstuff/knewstuffbutton.h
@@ -46,7 +46,7 @@ class Button : public KPushButton
* @param what text describing what is being downloaded. will be
* shown on the button as "Download New <what>"
* @param providerList the URL to the list of providers; if empty
- * we first try the ProvidersUrl from KGlobal::config, then we
+ * we first try the ProvidersUrl from TDEGlobal::config, then we
* fall back to a hardcoded value
* @param resourceType the Hotstuff data type for this downlaod such
* as "korganizer/calendar"
diff --git a/knewstuff/knewstuffgeneric.cpp b/knewstuff/knewstuffgeneric.cpp
index 8438e25ea..1e4e6ecc3 100644
--- a/knewstuff/knewstuffgeneric.cpp
+++ b/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/knewstuff/knewstuffsecure.cpp b/knewstuff/knewstuffsecure.cpp
index f68be7ae3..5010b5084 100644
--- a/knewstuff/knewstuffsecure.cpp
+++ b/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/knewstuff/provider.cpp b/knewstuff/provider.cpp
index 3c4018a13..b9dd24ed8 100644
--- a/knewstuff/provider.cpp
+++ b/knewstuff/provider.cpp
@@ -219,7 +219,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/knewstuff/provider.h b/knewstuff/provider.h
index 37e2a8daf..829e52d71 100644
--- a/knewstuff/provider.h
+++ b/knewstuff/provider.h
@@ -186,7 +186,7 @@ class KDE_EXPORT ProviderLoader : public TQObject
*
* @param type data type such as 'kdesktop/wallpaper'.
* @param providerList the URl to the list of providers; if empty
- * we first try the ProvidersUrl from KGlobal::config, then we
+ * we first try the ProvidersUrl from TDEGlobal::config, then we
* fall back to a hardcoded value.
*/
void load( const TQString &type, const TQString &providerList = TQString::null );
diff --git a/knewstuff/security.cpp b/knewstuff/security.cpp
index 247c6d5bc..d9ad85a7c 100644
--- a/knewstuff/security.cpp
+++ b/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/knewstuff/security.h b/knewstuff/security.h
index 2831770e0..230821e7e 100644
--- a/knewstuff/security.h
+++ b/knewstuff/security.h
@@ -22,7 +22,7 @@
#include <tqobject.h>
class KProcIO;
-class KProcess;
+class TDEProcess;
struct KeyStruct {
TQString id;
@@ -120,7 +120,7 @@ private:
TQString m_secretKey; /// the key used for signing
private slots:
- void slotProcessExited(KProcess *process);
+ void slotProcessExited(TDEProcess *process);
void slotDataArrived(KProcIO *process);
signals:
diff --git a/knewstuff/testnewstuff.cpp b/knewstuff/testnewstuff.cpp
index a1de4c1d0..db8e255ff 100644
--- a/knewstuff/testnewstuff.cpp
+++ b/knewstuff/testnewstuff.cpp
@@ -54,9 +54,9 @@ bool TestNewStuff::install( const TQString &fileName )
bool TestNewStuff::createUploadFile( const TQString &fileName )
{
- KProcess p;
+ TDEProcess p;
p << "touch" << fileName;
- p.start(KProcess::Block);
+ p.start(TDEProcess::Block);
kdDebug() << "TestNewStuff::createUploadFile(): " << fileName << endl;
return true;
}
diff --git a/knewstuff/uploaddialog.cpp b/knewstuff/uploaddialog.cpp
index cecc67e32..0a9ec85c0 100644
--- a/knewstuff/uploaddialog.cpp
+++ b/knewstuff/uploaddialog.cpp
@@ -94,7 +94,7 @@ UploadDialog::UploadDialog( Engine *engine, TQWidget *parent ) :
topLayout->addWidget( languageLabel, 6, 0 );
mLanguageCombo = new TQComboBox( topPage );
topLayout->addWidget( mLanguageCombo, 6, 1 );
- mLanguageCombo->insertStringList( KGlobal::locale()->languageList() );
+ mLanguageCombo->insertStringList( TDEGlobal::locale()->languageList() );
TQLabel *previewLabel = new TQLabel( i18n("Preview URL:"), topPage );
topLayout->addWidget( previewLabel, 7, 0 );