Rename KGlobal, KProcess, and KClipboard to avoid conflicts with KDE4

pull/21/head
Timothy Pearson 10 years ago
parent 5c4a80ead2
commit a9bde819f2

@ -133,9 +133,9 @@ Part::Part( TQWidget *parentWidget, const char * /*widgetName*/,
// start knotifyclient if not already started. makes it work for people who doesn't use full kde, according to kmail devels
KNotifyClient::startDaemon();
m_standardFeedList = KGlobal::dirs()->saveLocation("data", "akregator/data") + "/feeds.opml";
m_standardFeedList = TDEGlobal::dirs()->saveLocation("data", "akregator/data") + "/feeds.opml";
m_tagSetPath = KGlobal::dirs()->saveLocation("data", "akregator/data") + "/tagset.xml";
m_tagSetPath = TDEGlobal::dirs()->saveLocation("data", "akregator/data") + "/tagset.xml";
Backend::StorageFactoryDummyImpl* dummyFactory = new Backend::StorageFactoryDummyImpl();
Backend::StorageFactoryRegistry::self()->registerFactory(dummyFactory, dummyFactory->key());
@ -832,10 +832,10 @@ void Part::initFonts()
TQStringList fonts = Settings::fonts();
if (fonts.isEmpty())
{
fonts.append(KGlobalSettings::generalFont().family());
fonts.append(KGlobalSettings::fixedFont().family());
fonts.append(KGlobalSettings::generalFont().family());
fonts.append(KGlobalSettings::generalFont().family());
fonts.append(TDEGlobalSettings::generalFont().family());
fonts.append(TDEGlobalSettings::fixedFont().family());
fonts.append(TDEGlobalSettings::generalFont().family());
fonts.append(TDEGlobalSettings::generalFont().family());
fonts.append("0");
}
Settings::setFonts(fonts);
@ -860,7 +860,7 @@ void Part::initFonts()
if (konq.hasKey("MinimumFontSize"))
minfs = konq.readNumEntry("MinimumFontSize");
else
minfs = KGlobalSettings::generalFont().pointSize();
minfs = TDEGlobalSettings::generalFont().pointSize();
kdDebug() << "Part::initFonts(): set MinimumFontSize to " << minfs << endl;
Settings::setMinimumFontSize(minfs);
}
@ -871,7 +871,7 @@ void Part::initFonts()
if (konq.hasKey("MediumFontSize"))
medfs = konq.readNumEntry("MediumFontSize");
else
medfs = KGlobalSettings::generalFont().pointSize();
medfs = TDEGlobalSettings::generalFont().pointSize();
kdDebug() << "Part::initFonts(): set MediumFontSize to " << medfs << endl;
Settings::setMediumFontSize(medfs);
}

@ -247,7 +247,7 @@ View::View( Part *part, TQWidget *parent, ActionManagerImpl* actionManager, cons
m_listTabWidget->setViewMode(ListTabWidget::single);
m_feedListView = new NodeListView( this, "feedtree" );
m_listTabWidget->addView(m_feedListView, i18n("Feeds"), KGlobal::iconLoader()->loadIcon("folder", KIcon::Small));
m_listTabWidget->addView(m_feedListView, i18n("Feeds"), TDEGlobal::iconLoader()->loadIcon("folder", KIcon::Small));
connect(m_feedListView, TQT_SIGNAL(signalContextMenu(KListView*, TreeNode*, const TQPoint&)), this, TQT_SLOT(slotFeedTreeContextMenu(KListView*, TreeNode*, const TQPoint&)));
@ -256,7 +256,7 @@ View::View( Part *part, TQWidget *parent, ActionManagerImpl* actionManager, cons
TreeNode*, Folder*)));
m_tagNodeListView = new NodeListView(this);
m_listTabWidget->addView(m_tagNodeListView, i18n("Tags"), KGlobal::iconLoader()->loadIcon("rss_tag", KIcon::Small));
m_listTabWidget->addView(m_tagNodeListView, i18n("Tags"), TDEGlobal::iconLoader()->loadIcon("rss_tag", KIcon::Small));
connect(m_tagNodeListView, TQT_SIGNAL(signalContextMenu(KListView*, TreeNode*, const TQPoint&)), this, TQT_SLOT(slotFeedTreeContextMenu(KListView*, TreeNode*, const TQPoint&)));

@ -156,7 +156,7 @@ class ArticleListView::ArticleItem : public KListViewItem
// FIXME: Remove resolveEntities for KDE 4.0, it's now done in the parser
ArticleListView::ArticleItem::ArticleItem( TQListView *parent, const Article& a)
: KListViewItem( parent, KCharsets::resolveEntities(a.title()), a.feed()->title(), KGlobal::locale()->formatDateTime(a.pubDate(), true, false) ), m_article(a), m_pubDate(a.pubDate().toTime_t())
: KListViewItem( parent, KCharsets::resolveEntities(a.title()), a.feed()->title(), TDEGlobal::locale()->formatDateTime(a.pubDate(), true, false) ), m_article(a), m_pubDate(a.pubDate().toTime_t())
{
if (a.keep())
setPixmap(0, keepFlag());
@ -197,7 +197,7 @@ void ArticleListView::ArticleItem::updateItem(const Article& article)
setPixmap(0, m_article.keep() ? keepFlag() : TQPixmap());
setText(0, KCharsets::resolveEntities(m_article.title()));
setText(1, m_article.feed()->title());
setText(2, KGlobal::locale()->formatDateTime(m_article.pubDate(), true, false));
setText(2, TDEGlobal::locale()->formatDateTime(m_article.pubDate(), true, false));
}
int ArticleListView::ArticleItem::compare(TQListViewItem *i, int col, bool ascending) const {

@ -177,7 +177,7 @@ ArticleViewer::ArticleViewer(TQWidget *parent, const char *name)
connect(kapp, TQT_SIGNAL(kdisplayPaletteChanged()), this, TQT_SLOT(slotPaletteOrFontChanged()) );
connect(kapp, TQT_SIGNAL(kdisplayFontChanged()), this, TQT_SLOT(slotPaletteOrFontChanged()) );
m_imageDir.setPath(KGlobal::dirs()->saveLocation("cache", "akregator/Media/"));
m_imageDir.setPath(TDEGlobal::dirs()->saveLocation("cache", "akregator/Media/"));
m_htmlFooter = "</body></html>";
}
@ -420,7 +420,7 @@ TQString ArticleViewer::formatArticleNormalMode(Feed* feed, const Article& artic
text += TQString("<span class=\"header\" dir=\"%1\">").arg(directionOf(i18n("Date")));
text += TQString ("%1:").arg(i18n("Date"));
text += "</span><span class=\"headertext\">";
text += KGlobal::locale()->formatDateTime(article.pubDate(), false, false)+"</span>\n"; // TODO: might need RTL?
text += TDEGlobal::locale()->formatDateTime(article.pubDate(), false, false)+"</span>\n"; // TODO: might need RTL?
}
TQString author = article.author();
if (!author.isEmpty())
@ -515,7 +515,7 @@ TQString ArticleViewer::formatArticleCombinedMode(Feed* feed, const Article& art
text += TQString("<span class=\"header\" dir=\"%1\">").arg(directionOf(i18n("Date")));
text += TQString ("%1:").arg(i18n("Date"));
text += "</span><span class=\"headertext\">";
text += KGlobal::locale()->formatDateTime(article.pubDate(), false, false)+"</span>\n"; // TODO: might need RTL?
text += TDEGlobal::locale()->formatDateTime(article.pubDate(), false, false)+"</span>\n"; // TODO: might need RTL?
}
TQString author = article.author();

@ -208,7 +208,7 @@ TQValueList<Article> Feed::articles(const TQString& tag)
void Feed::loadImage()
{
TQString imageFileName = KGlobal::dirs()->saveLocation("cache", "akregator/Media/")
TQString imageFileName = TDEGlobal::dirs()->saveLocation("cache", "akregator/Media/")
+ Utils::fileNameForUrl(d->xmlUrl) +
".png";
d->imagePixmap.load(imageFileName, "PNG");
@ -589,7 +589,7 @@ void Feed::slotImageFetched(const TQPixmap& image)
if (image.isNull())
return;
d->imagePixmap=image;
d->imagePixmap.save(KGlobal::dirs()->saveLocation("cache", "akregator/Media/")
d->imagePixmap.save(TDEGlobal::dirs()->saveLocation("cache", "akregator/Media/")
+ Utils::fileNameForUrl(d->xmlUrl) +
".png","PNG");
nodeModified();

@ -140,7 +140,7 @@ void FeedIconManager::slotFeedDestroyed(TreeNode* node)
void FeedIconManager::slotIconChanged(bool /*isHost*/, const TQString& hostOrURL,
const TQString& iconName)
{
TQString iconFile = KGlobal::dirs()->findResource("cache",
TQString iconFile = TDEGlobal::dirs()->findResource("cache",
iconName+".png");
Feed* f;
TQPixmap p = TQPixmap(iconFile);

@ -84,12 +84,12 @@ void FeedItem::nodeChanged()
TQPixmap FeedItem::errorPixmap()
{
return KGlobal::iconLoader()->loadIcon("error", KIcon::Small);
return TDEGlobal::iconLoader()->loadIcon("error", KIcon::Small);
}
TQPixmap FeedItem::defaultPixmap()
{
return KGlobal::iconLoader()->loadIcon("txt", KIcon::Small);
return TDEGlobal::iconLoader()->loadIcon("txt", KIcon::Small);
}
void FeedItem::initialize(Feed* node)

@ -56,7 +56,7 @@ FolderItem::FolderItem(KListView* parent, TreeNodeItem* after, Folder* node) : T
void FolderItem::initialize(Folder* node)
{
setOpen(node->isOpen());
setPixmap ( 0, KGlobal::iconLoader()->loadIcon("folder", KIcon::Small) );
setPixmap ( 0, TDEGlobal::iconLoader()->loadIcon("folder", KIcon::Small) );
if (node)
setText(0, node->title());
}

@ -207,12 +207,12 @@ void OutputRetriever::retrieveData(const KURL &url)
d->buffer->open(IO_WriteOnly);
d->process = new KShellProcess();
connect(d->process, TQT_SIGNAL(processExited(KProcess *)),
TQT_SLOT(slotExited(KProcess *)));
connect(d->process, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)),
TQT_SLOT(slotOutput(KProcess *, char *, int)));
connect(d->process, TQT_SIGNAL(processExited(TDEProcess *)),
TQT_SLOT(slotExited(TDEProcess *)));
connect(d->process, TQT_SIGNAL(receivedStdout(TDEProcess *, char *, int)),
TQT_SLOT(slotOutput(TDEProcess *, char *, int)));
*d->process << url.path();
d->process->start(KProcess::NotifyOnExit, KProcess::Stdout);
d->process->start(TDEProcess::NotifyOnExit, TDEProcess::Stdout);
}
int OutputRetriever::errorCode() const
@ -220,12 +220,12 @@ int OutputRetriever::errorCode() const
return d->lastError;
}
void OutputRetriever::slotOutput(KProcess *, char *data, int length)
void OutputRetriever::slotOutput(TDEProcess *, char *data, int length)
{
d->buffer->writeBlock(data, length);
}
void OutputRetriever::slotExited(KProcess *p)
void OutputRetriever::slotExited(TDEProcess *p)
{
if (!p->normalExit())
d->lastError = p->exitStatus();

@ -21,7 +21,7 @@ namespace KIO
{
class Job;
}
class KProcess;
class TDEProcess;
namespace RSS
{
@ -194,8 +194,8 @@ namespace RSS
virtual void abort() {}
private slots:
void slotOutput(KProcess *process, char *data, int length);
void slotExited(KProcess *process);
void slotOutput(TDEProcess *process, char *data, int length);
void slotExited(TDEProcess *process);
private:
OutputRetriever(const OutputRetriever &other);

@ -199,7 +199,7 @@ void MainWindow::optionsConfigureKeys()
void MainWindow::optionsConfigureToolbars()
{
saveMainWindowSettings(KGlobal::config(), autoSaveGroup());
saveMainWindowSettings(TDEGlobal::config(), autoSaveGroup());
// use the standard toolbar editor
KEditToolbar dlg(factory());
@ -212,7 +212,7 @@ void MainWindow::optionsConfigureToolbars()
void MainWindow::applyNewToolbarConfig()
{
applyMainWindowSettings(KGlobal::config(), autoSaveGroup());
applyMainWindowSettings(TDEGlobal::config(), autoSaveGroup());
}

@ -148,7 +148,7 @@ FeedStorageMK4Impl::FeedStorageMK4Impl(const TQString& url, StorageMK4Impl* main
TQString t = url2;
TQString t2 = url2;
TQString filePath = main->archivePath() +"/"+ t.replace("/", "_").replace(":", "_");
d->oldArchivePath = KGlobal::dirs()->saveLocation("data", "akregator/Archive/") + t2.replace("/", "_").replace(":", "_") + ".xml";
d->oldArchivePath = TDEGlobal::dirs()->saveLocation("data", "akregator/Archive/") + t2.replace("/", "_").replace(":", "_") + ".xml";
d->convert = !TQFile::exists(filePath + ".mk4") && TQFile::exists(d->oldArchivePath);
d->storage = new c4_Storage((filePath + ".mk4").local8Bit(), true);

@ -90,7 +90,7 @@ StorageMK4Impl::StorageMK4Impl() : d(new StorageMK4ImplPrivate)
TQString StorageMK4Impl::defaultArchivePath()
{
return KGlobal::dirs()->saveLocation("data", "akregator")+"Archive";
return TDEGlobal::dirs()->saveLocation("data", "akregator")+"Archive";
}
StorageMK4Impl::~StorageMK4Impl()

@ -46,7 +46,7 @@ class StorageMK4Impl : public Storage
virtual ~StorageMK4Impl();
/** KGlobal::dirs()->saveLocation("data", "akregator")+"/Archive" */
/** TDEGlobal::dirs()->saveLocation("data", "akregator")+"/Archive" */
static TQString defaultArchivePath();
/** sets the directory where the metakit files will be stored.

@ -55,7 +55,7 @@ NotificationManager::~NotificationManager()
void NotificationManager::setWidget(TQWidget* widget, TDEInstance* inst)
{
m_widget = widget;
m_instance = inst != NULL ? inst : KGlobal::instance();
m_instance = inst != NULL ? inst : TDEGlobal::instance();
}
void NotificationManager::slotNotifyArticle(const Article& article)

@ -99,7 +99,7 @@ PageViewer::PageViewer(TQWidget *parent, const char *name)
: Viewer(parent, name), d(new PageViewerPrivate)
{
// this hack is necessary since the part looks for []HTML Settings] in
// KGlobal::config() by default, which is wrong when running in Kontact
// TDEGlobal::config() by default, which is wrong when running in Kontact
KHTMLSettings* s = const_cast<KHTMLSettings*> (settings());
s->init(Settings::self()->config());
@ -260,7 +260,7 @@ bool PageViewer::openURL(const KURL& url)
TQString favicon = FeedIconManager::self()->iconLocation(url);
if (!favicon.isEmpty())
emit setTabIcon(TQPixmap(KGlobal::dirs()->findResource("cache", favicon+".png")));
emit setTabIcon(TQPixmap(TDEGlobal::dirs()->findResource("cache", favicon+".png")));
else
emit setTabIcon(SmallIcon("html"));
@ -398,7 +398,7 @@ void PageViewer::slotPaletteOrFontChanged()
obj->tqt_invoke(id, o);
// this hack is necessary since the part looks for []HTML Settings] in
// KGlobal::config() by default, which is wrong when running in Kontact
// TDEGlobal::config() by default, which is wrong when running in Kontact
// NOTE: when running in Kontact, immediate updating doesn't work
KHTMLSettings* s = const_cast<KHTMLSettings*> (settings());
s->init(Settings::self()->config());

@ -84,7 +84,7 @@ SearchBar::SearchBar(TQWidget* parent, const char* name) : TQHBox(parent, name),
statusLabel->setText( i18n("Status:") );
d->searchCombo = new KComboBox(this, "searchcombo");
TQPixmap iconAll = KGlobal::iconLoader()->loadIcon("exec", KIcon::Small);
TQPixmap iconAll = TDEGlobal::iconLoader()->loadIcon("exec", KIcon::Small);
TQPixmap iconNew(locate("data", "akregator/pics/kmmsgnew.png"));
TQPixmap iconUnread(locate("data", "akregator/pics/kmmsgunseen.png"));
TQPixmap iconKeep(locate("data", "akregator/pics/kmmsgflag.png"));

@ -62,13 +62,13 @@ void TagNodeItem::initialize(TagNode* node)
if (node)
{
setText(0, node->title());
setPixmap ( 0, KGlobal::iconLoader()->loadIcon(node->icon(), KIcon::Small) );
setPixmap ( 0, TDEGlobal::iconLoader()->loadIcon(node->icon(), KIcon::Small) );
}
}
void TagNodeItem::nodeChanged()
{
setPixmap ( 0, KGlobal::iconLoader()->loadIcon(node()->icon(), KIcon::Small));
setPixmap ( 0, TDEGlobal::iconLoader()->loadIcon(node()->icon(), KIcon::Small));
TreeNodeItem::nodeChanged();
}

@ -144,7 +144,7 @@ void TrayIcon::slotSetUnread(int unread)
int oldH = pixmap()->size().height();
TQString uStr=TQString::number( unread );
TQFont f=KGlobalSettings::generalFont();
TQFont f=TDEGlobalSettings::generalFont();
f.setBold(true);
float pointSize=f.pointSizeFloat();
TQFontMetrics fm(f);

@ -113,10 +113,10 @@ void Viewer::displayInExternalBrowser(const KURL &url, const TQString &mimetype)
TQString cmd = Settings::externalBrowserCustomCommand();
TQString urlStr = url.url();
cmd.replace(TQRegExp("%u"), urlStr);
KProcess *proc = new KProcess;
TDEProcess *proc = new TDEProcess;
TQStringList cmdAndArgs = KShell::splitArgs(cmd);
*proc << cmdAndArgs;
proc->start(KProcess::DontCare);
proc->start(TDEProcess::DontCare);
delete proc;
}
}

@ -96,7 +96,7 @@ CertificateInfoWidgetImpl::CertificateInfoWidgetImpl( const GpgME::Key & key, bo
connect( importButton, TQT_SIGNAL( clicked() ),
this, TQT_SLOT( slotImportCertificate() ) );
dumpView->setFont( KGlobalSettings::fixedFont() );
dumpView->setFont( TDEGlobalSettings::fixedFont() );
if ( !key.isNull() )
setKey( key );
@ -253,36 +253,36 @@ void CertificateInfoWidgetImpl::startCertificateChainListing() {
}
void CertificateInfoWidgetImpl::startCertificateDump() {
KProcess* proc = new KProcess( TQT_TQOBJECT(this) );
TDEProcess* proc = new TDEProcess( TQT_TQOBJECT(this) );
(*proc) << "gpgsm"; // must be in the PATH
(*proc) << "--dump-keys";
(*proc) << mChain.front().primaryFingerprint();
TQObject::connect( proc, TQT_SIGNAL( receivedStdout(KProcess *, char *, int) ),
this, TQT_SLOT( slotCollectStdout(KProcess *, char *, int) ) );
TQObject::connect( proc, TQT_SIGNAL( receivedStderr(KProcess *, char *, int) ),
this, TQT_SLOT( slotCollectStderr(KProcess *, char *, int) ) );
TQObject::connect( proc, TQT_SIGNAL( processExited(KProcess*) ),
this, TQT_SLOT( slotDumpProcessExited(KProcess*) ) );
TQObject::connect( proc, TQT_SIGNAL( receivedStdout(TDEProcess *, char *, int) ),
this, TQT_SLOT( slotCollectStdout(TDEProcess *, char *, int) ) );
TQObject::connect( proc, TQT_SIGNAL( receivedStderr(TDEProcess *, char *, int) ),
this, TQT_SLOT( slotCollectStderr(TDEProcess *, char *, int) ) );
TQObject::connect( proc, TQT_SIGNAL( processExited(TDEProcess*) ),
this, TQT_SLOT( slotDumpProcessExited(TDEProcess*) ) );
if ( !proc->start( KProcess::NotifyOnExit, (KProcess::Communication)(KProcess::Stdout | KProcess::Stderr) ) ) {
if ( !proc->start( TDEProcess::NotifyOnExit, (TDEProcess::Communication)(TDEProcess::Stdout | TDEProcess::Stderr) ) ) {
TQString wmsg = i18n("Failed to execute gpgsm:\n%1").arg( i18n( "program not found" ) );
dumpView->setText( TQStyleSheet::escape( wmsg ) );
delete proc;
}
}
void CertificateInfoWidgetImpl::slotCollectStdout(KProcess *, char *buffer, int buflen)
void CertificateInfoWidgetImpl::slotCollectStdout(TDEProcess *, char *buffer, int buflen)
{
mDumpOutput += TQCString(buffer, buflen+1); // like KProcIO does
}
void CertificateInfoWidgetImpl::slotCollectStderr(KProcess *, char *buffer, int buflen)
void CertificateInfoWidgetImpl::slotCollectStderr(TDEProcess *, char *buffer, int buflen)
{
mDumpError += TQCString(buffer, buflen+1); // like KProcIO does
}
void CertificateInfoWidgetImpl::slotDumpProcessExited(KProcess* proc) {
void CertificateInfoWidgetImpl::slotDumpProcessExited(TDEProcess* proc) {
int rc = ( proc->normalExit() ) ? proc->exitStatus() : -1 ;
if ( rc == 0 ) {

@ -39,7 +39,7 @@
#include <tqvaluelist.h>
class KProcess;
class TDEProcess;
class TQListViewItem;
namespace GpgME {
@ -66,9 +66,9 @@ private slots:
void slotNextKey( const GpgME::Key & key );
void slotKeyExistanceCheckNextCandidate( const GpgME::Key & key );
void slotKeyExistanceCheckFinished();
void slotCollectStdout(KProcess *, char *, int);
void slotCollectStderr(KProcess *, char *, int);
void slotDumpProcessExited(KProcess*);
void slotCollectStdout(TDEProcess *, char *, int);
void slotCollectStderr(TDEProcess *, char *, int);
void slotDumpProcessExited(TDEProcess*);
private:
void startCertificateChainListing();

@ -129,7 +129,7 @@ CertificateWizardImpl::CertificateWizardImpl( TQWidget* parent, const char* nam
connect( storeUR, TQT_SIGNAL( urlSelected( const TQString& ) ),
this, TQT_SLOT( slotURLSelected( const TQString& ) ) );
const KConfigGroup config( KGlobal::config(), "CertificateCreationWizard" );
const KConfigGroup config( TDEGlobal::config(), "CertificateCreationWizard" );
caEmailED->setText( config.readEntry( "CAEmailAddress" ) );
connect( this, TQT_SIGNAL( helpClicked() ),
@ -337,7 +337,7 @@ void CertificateWizardImpl::createPersonalDataPage()
TQGridLayout* grid = new TQGridLayout( edContainer, 2, 1,
KDialog::marginHint(), KDialog::spacingHint() );
KConfigGroup config( KGlobal::config(), "CertificateCreationWizard" );
KConfigGroup config( TDEGlobal::config(), "CertificateCreationWizard" );
TQStringList attrOrder = config.readListEntry( "DNAttributeOrder" );
if ( attrOrder.empty() )
attrOrder << "CN!" << "L" << "OU" << "O!" << "C!" << "EMAIL!";

@ -930,10 +930,10 @@ bool CertManager::connectAndStartDirmngr( const char * slot, const char * proces
assert( processname );
assert( mDirmngrProc );
mErrorbuffer = TQString();
connect( mDirmngrProc, TQT_SIGNAL(processExited(KProcess*)), slot );
connect( mDirmngrProc, TQT_SIGNAL(receivedStderr(KProcess*,char*,int) ),
this, TQT_SLOT(slotStderr(KProcess*,char*,int)) );
if( !mDirmngrProc->start( KProcess::NotifyOnExit, KProcess::Stderr ) ) {
connect( mDirmngrProc, TQT_SIGNAL(processExited(TDEProcess*)), slot );
connect( mDirmngrProc, TQT_SIGNAL(receivedStderr(TDEProcess*,char*,int) ),
this, TQT_SLOT(slotStderr(TDEProcess*,char*,int)) );
if( !mDirmngrProc->start( TDEProcess::NotifyOnExit, TDEProcess::Stderr ) ) {
delete mDirmngrProc; mDirmngrProc = 0;
KMessageBox::error( this, i18n( "Unable to start %1 process. Please check your installation." ).arg( processname ), i18n( "Certificate Manager Error" ) );
return false;
@ -945,7 +945,7 @@ void CertManager::startImportCRL( const TQString& filename, bool isTempFile )
{
assert( !mDirmngrProc );
mImportCRLTempFile = isTempFile ? filename : TQString();
mDirmngrProc = new KProcess();
mDirmngrProc = new TDEProcess();
*mDirmngrProc << "gpgsm" << "--call-dirmngr" << "loadcrl" << filename;
if ( !connectAndStartDirmngr( TQT_SLOT(slotDirmngrExited()), "gpgsm" ) ) {
updateImportActions( true );
@ -956,13 +956,13 @@ void CertManager::startImportCRL( const TQString& filename, bool isTempFile )
void CertManager::startClearCRLs() {
assert( !mDirmngrProc );
mDirmngrProc = new KProcess();
mDirmngrProc = new TDEProcess();
*mDirmngrProc << "dirmngr" << "--flush";
//*mDirmngrProc << "gpgsm" << "--call-dimngr" << "flush"; // use this once it's implemented!
connectAndStartDirmngr( TQT_SLOT(slotClearCRLsResult()), "dirmngr" );
}
void CertManager::slotStderr( KProcess*, char* buf, int len ) {
void CertManager::slotStderr( TDEProcess*, char* buf, int len ) {
mErrorbuffer += TQString::fromLocal8Bit( buf, len );
}
@ -1423,10 +1423,10 @@ void CertManager::importNextURLOrRedisplay()
void CertManager::slotStartWatchGnuPG()
{
KProcess certManagerProc;
TDEProcess certManagerProc;
certManagerProc << "kwatchgnupg";
if( !certManagerProc.start( KProcess::DontCare ) )
if( !certManagerProc.start( TDEProcess::DontCare ) )
KMessageBox::error( this, i18n( "Could not start GnuPG LogViewer (kwatchgnupg). "
"Please check your installation!" ),
i18n( "Kleopatra Error" ) );

@ -54,7 +54,7 @@ namespace Kleo {
namespace KIO {
class Job;
}
class KProcess;
class TDEProcess;
class KToolBar;
class KAction;
@ -118,7 +118,7 @@ private slots:
void slotImportCRLJobFinished( KIO::Job * );
void slotDirmngrExited();
void slotStderr( KProcess*, char*, int );
void slotStderr( TDEProcess*, char*, int );
void slotToggleRemote(int idx);
void slotToggleHierarchicalView( bool );
@ -182,7 +182,7 @@ private:
Kleo::ProgressBar * mProgressBar;
TQLabel * mStatusLabel;
KProcess * mDirmngrProc;
TDEProcess * mDirmngrProc;
TQString mErrorbuffer;
TQPtrList<Kleo::KeyListViewItem> mItemsToDelete;
KURL::List mURLsToImport;

@ -52,7 +52,7 @@ ConfigureDialog::ConfigureDialog( TQWidget *parent, const char *name, bool modal
// the KCMultiDialog starts with the size of the first kcm, not
// the largest one. This way at least after the first showing of
// the largest kcm the size is kept.
const KConfigGroup geometry( KGlobal::config(), "Geometry" );
const KConfigGroup geometry( TDEGlobal::config(), "Geometry" );
const int width = geometry.readNumEntry( "ConfigureDialogWidth" );
const int height = geometry.readNumEntry( "ConfigureDialogHeight" );
if ( width != 0 && height != 0 ) {
@ -62,7 +62,7 @@ ConfigureDialog::ConfigureDialog( TQWidget *parent, const char *name, bool modal
}
void ConfigureDialog::hideEvent( TQHideEvent * ) {
KConfigGroup geometry( KGlobal::config(), "Geometry" );
KConfigGroup geometry( TDEGlobal::config(), "Geometry" );
geometry.writeEntry( "ConfigureDialogWidth", width() );
geometry.writeEntry( "ConfigureDialogHeight",height() );
}

@ -57,7 +57,7 @@ CRLView::CRLView( TQWidget* parent, const char* name, bool modal )
topLayout->addWidget( new TQLabel( i18n("CRL cache dump:"), this ) );
_textView = new TQTextEdit( this );
_textView->setFont( KGlobalSettings::fixedFont() );
_textView->setFont( TDEGlobalSettings::fixedFont() );
_textView->setTextFormat( TQTextEdit::LogText );
topLayout->addWidget( _textView );
@ -99,22 +99,22 @@ void CRLView::slotUpdateView()
_textView->clear();
_buffer = TQString();
if( _process == 0 ) {
_process = new KProcess();
_process = new TDEProcess();
*_process << "gpgsm" << "--call-dirmngr" << "listcrls";
connect( _process, TQT_SIGNAL( receivedStdout( KProcess*, char*, int) ),
this, TQT_SLOT( slotReadStdout( KProcess*, char*, int ) ) );
connect( _process, TQT_SIGNAL( processExited( KProcess* ) ),
connect( _process, TQT_SIGNAL( receivedStdout( TDEProcess*, char*, int) ),
this, TQT_SLOT( slotReadStdout( TDEProcess*, char*, int ) ) );
connect( _process, TQT_SIGNAL( processExited( TDEProcess* ) ),
this, TQT_SLOT( slotProcessExited() ) );
}
if( _process->isRunning() ) _process->kill();
if( !_process->start( KProcess::NotifyOnExit, KProcess::Stdout ) ) {
if( !_process->start( TDEProcess::NotifyOnExit, TDEProcess::Stdout ) ) {
KMessageBox::error( this, i18n( "Unable to start gpgsm process. Please check your installation." ), i18n( "Certificate Manager Error" ) );
slotProcessExited();
}
_timer->start( 1000 );
}
void CRLView::slotReadStdout( KProcess*, char* buf, int len)
void CRLView::slotReadStdout( TDEProcess*, char* buf, int len)
{
_buffer.append( TQString::fromUtf8( buf, len ) );
}

@ -38,7 +38,7 @@
class TQTextEdit;
class TQPushButton;
class KProcess;
class TDEProcess;
class TQTimer;
class CRLView : public TQDialog {
@ -51,7 +51,7 @@ public slots:
void slotUpdateView();
protected slots:
void slotReadStdout( KProcess*, char* buf, int len);
void slotReadStdout( TDEProcess*, char* buf, int len);
void slotProcessExited();
void slotAppendBuffer();
@ -62,7 +62,7 @@ private:
TQTextEdit* _textView;
TQPushButton* _updateButton;
TQPushButton* _closeButton;
KProcess* _process;
TDEProcess* _process;
TQTimer* _timer;
TQString _buffer;
};

@ -69,7 +69,7 @@ KWatchGnuPGMainWindow::KWatchGnuPGMainWindow( TQWidget* parent, const char* name
setCentralWidget( mCentralWidget );
mWatcher = new KProcIO( TQTextCodec::codecForMib( 106 /*utf-8*/ ) );
connect( mWatcher, TQT_SIGNAL( processExited(KProcess*) ),
connect( mWatcher, TQT_SIGNAL( processExited(TDEProcess*) ),
this, TQT_SLOT( slotWatcherExited() ) );
connect( mWatcher, TQT_SIGNAL( readReady(KProcIO*) ),
this, TQT_SLOT( slotReadStdout() ) );
@ -127,7 +127,7 @@ void KWatchGnuPGMainWindow::slotConfigureToolbars()
void KWatchGnuPGMainWindow::startWatcher()
{
disconnect( mWatcher, TQT_SIGNAL( processExited(KProcess*) ),
disconnect( mWatcher, TQT_SIGNAL( processExited(TDEProcess*) ),
this, TQT_SLOT( slotWatcherExited() ) );
if( mWatcher->isRunning() ) {
mWatcher->kill();
@ -150,7 +150,7 @@ void KWatchGnuPGMainWindow::startWatcher()
mCentralWidget->append( tqtr("[%1] Log started")
.arg( TQDateTime::currentDateTime().toString(Qt::ISODate) ) );
}
connect( mWatcher, TQT_SIGNAL( processExited(KProcess*) ),
connect( mWatcher, TQT_SIGNAL( processExited(TDEProcess*) ),
this, TQT_SLOT( slotWatcherExited() ) );
}
@ -251,7 +251,7 @@ void KWatchGnuPGMainWindow::slotSaveAs()
void KWatchGnuPGMainWindow::slotQuit()
{
disconnect( mWatcher, TQT_SIGNAL( processExited(KProcess*) ),
disconnect( mWatcher, TQT_SIGNAL( processExited(TDEProcess*) ),
this, TQT_SLOT( slotWatcherExited() ) );
mWatcher->kill();
kapp->quit();

@ -44,7 +44,7 @@ KWatchGnuPGTray::KWatchGnuPGTray( KWatchGnuPGMainWindow* mainwin )
{
kdDebug() << "KWatchGnuPGTray::KWatchGnuPGTray" << endl;
KGlobal::iconLoader()->addAppDir( "kwatchgnupg" );
TDEGlobal::iconLoader()->addAppDir( "kwatchgnupg" );
mNormalPix = loadIcon("kwatchgnupg");
mAttentionPix = loadIcon("kwatchgnupg2");

@ -110,8 +110,8 @@ GpgME::Error Kleo::ChiasmusJob::start() {
if ( const GpgME::Error err = setup() )
return mError = err;
connect( mSymCryptRun, TQT_SIGNAL(processExited(KProcess*)),
this, TQT_SLOT(slotProcessExited(KProcess*)) );
connect( mSymCryptRun, TQT_SIGNAL(processExited(TDEProcess*)),
this, TQT_SLOT(slotProcessExited(TDEProcess*)) );
if ( !mSymCryptRun->launch( mInput ) )
return mError = gpg_error( GPG_ERR_ENOENT ); // what else?
@ -120,7 +120,7 @@ GpgME::Error Kleo::ChiasmusJob::start() {
return mError = 0;
}
GpgME::Error Kleo::ChiasmusJob::slotProcessExited( KProcess * proc ) {
GpgME::Error Kleo::ChiasmusJob::slotProcessExited( TDEProcess * proc ) {
if ( proc != mSymCryptRun )
mError = gpg_error( GPG_ERR_INTERNAL );
else if ( mCanceled )
@ -172,7 +172,7 @@ GpgME::Error Kleo::ChiasmusJob::exec() {
if ( const GpgME::Error err = setup() )
return mError = err;
if ( !mSymCryptRun->launch( mInput, KProcess::Block ) ) {
if ( !mSymCryptRun->launch( mInput, TDEProcess::Block ) ) {
delete mSymCryptRun; mSymCryptRun = 0;
return mError = gpg_error( GPG_ERR_ENOENT ); // what else?
}

@ -40,7 +40,7 @@
#include <gpgmepp/context.h>
class KProcess;
class TDEProcess;
namespace Kleo {
@ -91,7 +91,7 @@ namespace Kleo {
void slotCancel();
private slots:
GpgME::Error slotProcessExited( KProcess * );
GpgME::Error slotProcessExited( TDEProcess * );
void slotTimeout();
private:

@ -45,7 +45,7 @@ Kleo::SymCryptRunProcessBase::SymCryptRunProcessBase( const TQString & class_, c
const TQString & keyFile, const TQString & options,
Operation mode,
TQObject * parent, const char * name )
: KProcess( parent, name ),
: TDEProcess( parent, name ),
mOperation( mode ), mOptions( options )
{
*this << "symcryptrun"
@ -58,10 +58,10 @@ Kleo::SymCryptRunProcessBase::SymCryptRunProcessBase( const TQString & class_, c
Kleo::SymCryptRunProcessBase::~SymCryptRunProcessBase() {}
bool Kleo::SymCryptRunProcessBase::launch( const TQByteArray & input, RunMode rm ) {
connect( this, TQT_SIGNAL(receivedStdout(KProcess*,char*,int)),
this, TQT_SLOT(slotReceivedStdout(KProcess*,char*,int)) );
connect( this, TQT_SIGNAL(receivedStderr(KProcess*,char*,int)),
this, TQT_SLOT(slotReceivedStderr(KProcess*,char*,int)) );
connect( this, TQT_SIGNAL(receivedStdout(TDEProcess*,char*,int)),
this, TQT_SLOT(slotReceivedStdout(TDEProcess*,char*,int)) );
connect( this, TQT_SIGNAL(receivedStderr(TDEProcess*,char*,int)),
this, TQT_SLOT(slotReceivedStderr(TDEProcess*,char*,int)) );
if ( rm == Block ) {
KTempFile tempfile;
tempfile.setAutoDelete( true );
@ -72,15 +72,15 @@ bool Kleo::SymCryptRunProcessBase::launch( const TQByteArray & input, RunMode rm
tempfile.close();
*this << "--input" << tempfile.name();
addOptions();
return KProcess::start( Block, All );
return TDEProcess::start( Block, All );
} else {
addOptions();
const bool ok = KProcess::start( rm, All );
const bool ok = TDEProcess::start( rm, All );
if ( !ok )
return ok;
mInput = input.copy();
writeStdin( mInput.begin(), mInput.size() );
connect( this, TQT_SIGNAL(wroteStdin(KProcess*)), this, TQT_SLOT(closeStdin()) );
connect( this, TQT_SIGNAL(wroteStdin(TDEProcess*)), this, TQT_SLOT(closeStdin()) );
return true;
}
}
@ -93,14 +93,14 @@ void Kleo::SymCryptRunProcessBase::addOptions() {
}
}
void Kleo::SymCryptRunProcessBase::slotReceivedStdout( KProcess * proc, char * buf, int len ) {
void Kleo::SymCryptRunProcessBase::slotReceivedStdout( TDEProcess * proc, char * buf, int len ) {
Q_ASSERT( proc == this );
const int oldsize = mOutput.size();
mOutput.resize( oldsize + len );
memcpy( mOutput.data() + oldsize, buf, len );
}
void Kleo::SymCryptRunProcessBase::slotReceivedStderr( KProcess * proc, char * buf, int len ) {
void Kleo::SymCryptRunProcessBase::slotReceivedStderr( TDEProcess * proc, char * buf, int len ) {
Q_ASSERT( proc == this );
if ( len > 0 )
mStderr += TQString::fromLocal8Bit( buf, len );

@ -41,7 +41,7 @@ class TQString;
namespace Kleo {
class SymCryptRunProcessBase : public KProcess {
class SymCryptRunProcessBase : public TDEProcess {
Q_OBJECT
public:
@ -61,11 +61,11 @@ public:
public slots:
/*! upgraded to slot */
void closeStdin() { KProcess::closeStdin(); }
void closeStdin() { TDEProcess::closeStdin(); }
private slots:
void slotReceivedStdout( KProcess *, char *, int );
void slotReceivedStderr( KProcess *, char *, int );
void slotReceivedStdout( TDEProcess *, char *, int );
void slotReceivedStderr( TDEProcess *, char *, int );
private:
void addOptions();

@ -57,7 +57,7 @@ struct Kleo::GnuPGProcessBase::Private {
Kleo::GnuPGProcessBase::GnuPGProcessBase( TQObject * parent, const char * name )
: KProcess( parent, name )
: TDEProcess( parent, name )
{
d = new Private();
}
@ -76,7 +76,7 @@ bool Kleo::GnuPGProcessBase::start( RunMode runmode, Communication comm ) {
// set up the status-fd. This should be in setupCommunication(),
// but then it's too late: we need the fd of the pipe to pass it
// as argument to the --status-fd option:
// PENDING(marc) find out why KProcess uses both pipe() and socketpair()...
// PENDING(marc) find out why TDEProcess uses both pipe() and socketpair()...
if ( ::pipe( d->statusFD ) < 0 ) {
kdDebug( 5150 ) << "Kleo::GnuPGProcessBase::start: pipe(2) failed: " << perror << endl;
return false;
@ -94,11 +94,11 @@ bool Kleo::GnuPGProcessBase::start( RunMode runmode, Communication comm ) {
//arguments.insert( it, "--enable-progress-filter" ); // gpgsm doesn't know this
}
}
return KProcess::start( runmode, comm );
return TDEProcess::start( runmode, comm );
}
int Kleo::GnuPGProcessBase::setupCommunication( Communication comm ) {
if ( int ok = KProcess::setupCommunication( comm ) )
if ( int ok = TDEProcess::setupCommunication( comm ) )
return ok;
if ( d->usetStatusFD ) {
// base class impl returned error, so close our fd's, too
@ -115,13 +115,13 @@ int Kleo::GnuPGProcessBase::commSetupDoneP() {
d->statnot = new TQSocketNotifier( d->statusFD[0], TQSocketNotifier::Read, this );
connect( d->statnot, TQT_SIGNAL(activated(int)), TQT_SLOT(slotChildStatus(int)) );
}
return KProcess::commSetupDoneP();
return TDEProcess::commSetupDoneP();
}
int Kleo::GnuPGProcessBase::commSetupDoneC() {
if ( d->usetStatusFD )
::fcntl( d->statusFD[1], F_SETFD, 0 );
return KProcess::commSetupDoneC();
return TDEProcess::commSetupDoneC();
}
void Kleo::GnuPGProcessBase::slotChildStatus( int fd ) {
@ -192,7 +192,7 @@ void Kleo::GnuPGProcessBase::parsetStatusOutput() {
}
void Kleo::GnuPGProcessBase::virtual_hook( int id, void * data ) {
KProcess::virtual_hook( id, data );
TDEProcess::virtual_hook( id, data );
}
#include "gnupgprocessbase.moc"

@ -40,12 +40,12 @@ namespace Kleo {
/**
* @short a base class for GPG and GPGSM processes.
*
* This KProcess subclass implements the status-fd handling common
* This TDEProcess subclass implements the status-fd handling common
* to GPG and GPGSM.
*
* @author Marc Mutz <mutz@kde.org>
*/
class GnuPGProcessBase : public KProcess {
class GnuPGProcessBase : public TDEProcess {
Q_OBJECT
public:

@ -80,7 +80,7 @@ void QGpgMECryptoConfig::runGpgConf( bool showErrors )
// run the process:
int rc = 0;
if ( !proc.start( KProcess::Block ) )
if ( !proc.start( TDEProcess::Block ) )
rc = -1;
else
rc = ( proc.normalExit() ) ? proc.exitStatus() : -2 ;
@ -179,7 +179,7 @@ void QGpgMECryptoConfigComponent::runGpgConf()
// run the process:
int rc = 0;
if ( !proc.start( KProcess::Block ) )
if ( !proc.start( TDEProcess::Block ) )
rc = -1;
else
rc = ( proc.normalExit() ) ? proc.exitStatus() : -1 ;
@ -280,20 +280,20 @@ void QGpgMECryptoConfigComponent::sync( bool runtime )
if ( runtime )
commandLine += " --runtime";
commandLine += " --change-options ";
commandLine += KProcess::quote( mName );
commandLine += TDEProcess::quote( mName );
commandLine += " < ";
commandLine += KProcess::quote( tmpFile.name() );
commandLine += TDEProcess::quote( tmpFile.name() );
//kdDebug(5150) << commandLine << endl;
//system( TQCString( "cat " ) + tmpFile.name().latin1() ); // DEBUG
KProcess proc;
TDEProcess proc;
proc.setUseShell( true );
proc << commandLine;
// run the process:
int rc = 0;
if ( !proc.start( KProcess::Block ) )
if ( !proc.start( TDEProcess::Block ) )
rc = -1;
else
rc = ( proc.normalExit() ) ? proc.exitStatus() : -1 ;

@ -107,14 +107,14 @@ GpgME::Error Kleo::QGpgMERefreshKeysJob::startAProcess() {
mProcess->setUsetStatusFD( true );
connect( mProcess, TQT_SIGNAL(processExited(KProcess*)),
TQT_SLOT(slotProcessExited(KProcess*)) );
connect( mProcess, TQT_SIGNAL(receivedStderr(KProcess*,char*,int)),
TQT_SLOT(slotStderr(KProcess*,char*,int)) );
connect( mProcess, TQT_SIGNAL(processExited(TDEProcess*)),
TQT_SLOT(slotProcessExited(TDEProcess*)) );
connect( mProcess, TQT_SIGNAL(receivedStderr(TDEProcess*,char*,int)),
TQT_SLOT(slotStderr(TDEProcess*,char*,int)) );
connect( mProcess, TQT_SIGNAL(status(Kleo::GnuPGProcessBase*,const TQString&,const TQStringList&)),
TQT_SLOT(slotStatus(Kleo::GnuPGProcessBase*,const TQString&,const TQStringList&)) );
if ( !mProcess->start( KProcess::NotifyOnExit, KProcess::Stderr ) ) {
if ( !mProcess->start( TDEProcess::NotifyOnExit, TDEProcess::Stderr ) ) {
mError = gpg_err_make( GPG_ERR_SOURCE_GPGSM, GPG_ERR_ENOENT ); // what else?
deleteLater();
return mError;
@ -182,11 +182,11 @@ void Kleo::QGpgMERefreshKeysJob::slotStatus( GnuPGProcessBase * proc, const TQSt
}
}
void Kleo::QGpgMERefreshKeysJob::slotStderr( KProcess *, char *, int ) {
void Kleo::QGpgMERefreshKeysJob::slotStderr( TDEProcess *, char *, int ) {
// implement? or not?
}
void Kleo::QGpgMERefreshKeysJob::slotProcessExited( KProcess * proc ) {
void Kleo::QGpgMERefreshKeysJob::slotProcessExited( TDEProcess * proc ) {
if ( proc != mProcess )
return;

@ -45,7 +45,7 @@ namespace GpgME {
class Error;
}
class KProcess;
class TDEProcess;
namespace Kleo {
@ -64,8 +64,8 @@ namespace Kleo {