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

pull/2/head
Timothy Pearson 10 years ago
parent 9a898d493f
commit 79b21d47bc

@ -188,7 +188,7 @@ often, or which user opened the most files or whatever.</para>
<title>Contributors</title>
<listitem><para>Conversion to kcontrol applet:</para>
<para>&Matthias.Hoelzer-Kluepfel; &Matthias.Hoelzer-Kluepfel.mail;</para></listitem>
<listitem><para>Use of <classname>KProcess</classname> instead of popen, and more error checking:</para>
<listitem><para>Use of <classname>TDEProcess</classname> instead of popen, and more error checking:</para>
<para>&David.Faure; &David.Faure.mail;</para></listitem>
<listitem><para>Conversion to kcmodule, added tab pages 2,3,4, bug
fixed:</para>

@ -1154,7 +1154,7 @@ void Theme2k::initUi()
mText-&gt;setFixedHeight( 48 );
setFixedSize( vbox-&gt;sizeHint() );
QRect rect(KGlobalSettings::splashScreenDesktopGeometry());
QRect rect(TDEGlobalSettings::splashScreenDesktopGeometry());
move( rect.x() + (rect.width() - size().width())/2,
rect.y() + (rect.height() - size().height())/2 );
}

@ -44,7 +44,7 @@ BackTrace::BackTrace(const KrashConfig *krashconf, TQObject *parent,
: TQObject(parent, name),
m_krashconf(krashconf), m_temp(NULL), m_temp_cmd(NULL)
{
m_proc = new KProcess;
m_proc = new TDEProcess;
}
BackTrace::~BackTrace()
@ -123,7 +123,7 @@ void BackTrace::start()
}
// start the debugger
m_proc = new KProcess;
m_proc = new TDEProcess;
m_proc->setUseShell(true);
if (need_root_access == false) {
@ -133,15 +133,15 @@ void BackTrace::start()
*m_proc << "tdesu -t --comment \"" << i18n("Administrative access is required to generate a backtrace") << "\" -c \"" << m_temp_cmd->name() << "\"";
}
connect(m_proc, TQT_SIGNAL(receivedStdout(KProcess*, char*, int)),
TQT_SLOT(slotReadInput(KProcess*, char*, int)));
connect(m_proc, TQT_SIGNAL(processExited(KProcess*)),
TQT_SLOT(slotProcessExited(KProcess*)));
connect(m_proc, TQT_SIGNAL(receivedStdout(TDEProcess*, char*, int)),
TQT_SLOT(slotReadInput(TDEProcess*, char*, int)));
connect(m_proc, TQT_SIGNAL(processExited(TDEProcess*)),
TQT_SLOT(slotProcessExited(TDEProcess*)));
m_proc->start ( KProcess::NotifyOnExit, KProcess::All );
m_proc->start ( TDEProcess::NotifyOnExit, TDEProcess::All );
}
void BackTrace::slotReadInput(KProcess *, char* buf, int buflen)
void BackTrace::slotReadInput(TDEProcess *, char* buf, int buflen)
{
TQString newstr = TQString::fromLocal8Bit(buf, buflen);
newstr.replace("\n\n", "\n");
@ -156,7 +156,7 @@ void BackTrace::slotReadInput(KProcess *, char* buf, int buflen)
}
}
void BackTrace::slotProcessExited(KProcess *proc)
void BackTrace::slotProcessExited(TDEProcess *proc)
{
// start it again
kill(m_krashconf->pid(), SIGCONT);

@ -28,7 +28,7 @@
#ifndef BACKTRACE_H
#define BACKTRACE_H
class KProcess;
class TDEProcess;
class KrashConfig;
class KTempFile;
@ -52,13 +52,13 @@ signals:
void done(const TQString &); // replaces whole text
protected slots:
void slotProcessExited(KProcess * proc);
void slotReadInput(KProcess * proc, char * buf, int buflen);
void slotProcessExited(TDEProcess * proc);
void slotReadInput(TDEProcess * proc, char * buf, int buflen);
private:
bool usefulBacktrace();
void processBacktrace();
KProcess *m_proc;
TDEProcess *m_proc;
const KrashConfig *m_krashconf;
KTempFile *m_temp;
KTempFile *m_temp_cmd;

@ -55,7 +55,7 @@ KrashDebugger :: KrashDebugger (const KrashConfig *krashconf, TQWidget *parent,
m_backtrace = new KTextBrowser(this);
m_backtrace->setTextFormat(TQt::PlainText);
m_backtrace->setFont(KGlobalSettings::fixedFont());
m_backtrace->setFont(TDEGlobalSettings::fixedFont());
TQWidget *w = new TQWidget( this );
( new TQHBoxLayout( w, 0, KDialog::marginHint() ) )->setAutoAdd( true );

@ -88,7 +88,7 @@ void KrashConfig :: readConfig()
KStartupInfo::sendFinish( id );
}
KConfig *config = KGlobal::config();
KConfig *config = TDEGlobal::config();
config->setGroup("drkonqi");
// maybe we should check if it's relative?

@ -176,10 +176,10 @@ void Toplevel :: slotUser2()
TQString str = m_krashconf->debugger();
m_krashconf->expandString(str, true);
KProcess proc;
TDEProcess proc;
proc.setUseShell(true);
proc << str;
proc.start(KProcess::DontCare);
proc.start(TDEProcess::DontCare);
}
void Toplevel :: slotNewDebuggingApp(const TQString& launchName)

@ -55,7 +55,7 @@ bool scanDesktopFile( TQPtrList<AppLnkCache> &appCache, const TQString &templ,
// find out where to put the .desktop files
TQString destName;
if ( destDir.isNull() )
destDir = KGlobal::dirs()->saveLocation( "apps" );
destDir = TDEGlobal::dirs()->saveLocation( "apps" );
else
destDir += "/";
@ -82,7 +82,7 @@ bool scanDesktopFile( TQPtrList<AppLnkCache> &appCache, const TQString &templ,
exec = exec.left( pos );
// try to locate the binary
TQString pexec = KGlobal::dirs()->findExe( exec,
TQString pexec = TDEGlobal::dirs()->findExe( exec,
TQString( ::getenv( "PATH" ) ) + ":/usr/X11R6/bin:/usr/games" );
if ( pexec.isEmpty() ) {
kdDebug(DBG_CODE) << "looking for " << exec.local8Bit()
@ -134,11 +134,11 @@ void decorateDirs( TQString destDir )
{
// find out where to put the .directory files
if ( destDir.isNull() )
destDir = KGlobal::dirs()->saveLocation( "apps" );
destDir = TDEGlobal::dirs()->saveLocation( "apps" );
else
destDir += "/";
TQStringList dirs = KGlobal::dirs()->findAllResources( "data", "kappfinder/apps/*.directory", true );
TQStringList dirs = TDEGlobal::dirs()->findAllResources( "data", "kappfinder/apps/*.directory", true );
TQStringList::Iterator it;
for ( it = dirs.begin(); it != dirs.end(); ++it ) {

@ -42,7 +42,7 @@ int main( int argc, char *argv[] )
return -1;
}
TQStringList templates = KGlobal::dirs()->findAllResources( "data", "kappfinder/apps/*.desktop", true );
TQStringList templates = TDEGlobal::dirs()->findAllResources( "data", "kappfinder/apps/*.desktop", true );
TQString dir = TQString( argv[ 1 ] ) + "/";

@ -161,9 +161,9 @@ TQListViewItem* TopLevel::addGroupItem( TQListViewItem *parent, const TQString &
void TopLevel::slotScan()
{
KIconLoader* loader = KGlobal::iconLoader();
KIconLoader* loader = TDEGlobal::iconLoader();
mTemplates = KGlobal::dirs()->findAllResources( "data", "kappfinder/apps/*.desktop", true );
mTemplates = TDEGlobal::dirs()->findAllResources( "data", "kappfinder/apps/*.desktop", true );
mAppCache.clear();

@ -60,7 +60,7 @@ KateApp::KateApp (TDECmdLineArgs *args)
dcopClient()->suspend();
// insert right translations for the katepart
KGlobal::locale()->insertCatalogue("katepart");
TDEGlobal::locale()->insertCatalogue("katepart");
// some global default
Kate::Document::setFileChangedDialogsActivated (true);

@ -70,7 +70,7 @@ void KateConsole::loadConsoleIfNeeded()
setFocusProxy(m_part->widget());
KGlobal::locale()->insertCatalogue("konsole");
TDEGlobal::locale()->insertCatalogue("konsole");
m_part->widget()->show();

@ -69,7 +69,7 @@ GrepTool::GrepTool(TQWidget *parent, const char *name)
: TQWidget(parent, name/*, false*/), m_fixFocus(true), childproc(0)
{
setCaption(i18n("Find in Files"));
config = KGlobal::config();
config = TDEGlobal::config();
config->setGroup("GrepTool");
lastSearchItems = config->readListEntry("LastSearchItems");
lastSearchPaths = config->readListEntry("LastSearchPaths");
@ -351,7 +351,7 @@ void GrepTool::slotSearch()
TQString pattern = leTemplate->text();
pattern.replace( "%s", s );
childproc = new KProcess();
childproc = new TDEProcess();
childproc->setWorkingDirectory( m_workingDir );
*childproc << "find" << ".";
if (!cbRecursive->isChecked())
@ -377,18 +377,18 @@ void GrepTool::slotSearch()
*childproc << "/dev/null"; //trick to have grep always display the filename
*childproc << ";";
connect( childproc, TQT_SIGNAL(processExited(KProcess *)),
connect( childproc, TQT_SIGNAL(processExited(TDEProcess *)),
TQT_SLOT(childExited()) );
connect( childproc, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)),
TQT_SLOT(receivedOutput(KProcess *, char *, int)) );
connect( childproc, TQT_SIGNAL(receivedStderr(KProcess *, char *, int)),
TQT_SLOT(receivedErrOutput(KProcess *, char *, int)) );
connect( childproc, TQT_SIGNAL(receivedStdout(TDEProcess *, char *, int)),
TQT_SLOT(receivedOutput(TDEProcess *, char *, int)) );
connect( childproc, TQT_SIGNAL(receivedStderr(TDEProcess *, char *, int)),
TQT_SLOT(receivedErrOutput(TDEProcess *, char *, int)) );
// actually it should be checked whether the process was started successfully
lbResult->setCursor( TQCursor(Qt::WaitCursor) );
btnClear->setEnabled( false );
btnSearch->setGuiItem( KGuiItem(i18n("Cancel"), "button_cancel"));
childproc->start(KProcess::NotifyOnExit, KProcess::AllOutput);
childproc->start(TDEProcess::NotifyOnExit, TDEProcess::AllOutput);
}
void GrepTool::slotSearchFor(const TQString &pattern)
@ -483,13 +483,13 @@ void GrepTool::childExited()
finish();
}
void GrepTool::receivedOutput(KProcess */*proc*/, char *buffer, int buflen)
void GrepTool::receivedOutput(TDEProcess */*proc*/, char *buffer, int buflen)
{
buf += TQCString(buffer, buflen+1);
processOutput();
}
void GrepTool::receivedErrOutput(KProcess */*proc*/, char *buffer, int buflen)
void GrepTool::receivedErrOutput(TDEProcess */*proc*/, char *buffer, int buflen)
{
errbuf += TQCString( buffer, buflen + 1 );
}

@ -30,7 +30,7 @@ class TQCheckBox;
class TQListBox;
class KPushButton;
class TQLabel;
class KProcess;
class TDEProcess;
class KConfig;
class KURLRequester;
class TQEvent;
@ -64,8 +64,8 @@ protected:
private slots:
void templateActivated(int index);
void childExited();
void receivedOutput(KProcess *proc, char *buffer, int buflen);
void receivedErrOutput(KProcess *proc, char *buffer, int buflen);
void receivedOutput(TDEProcess *proc, char *buffer, int buflen);
void receivedErrOutput(TDEProcess *proc, char *buffer, int buflen);
void itemSelected(const TQString&);
void slotSearch();
void slotCancel();
@ -82,7 +82,7 @@ private:
TQCheckBox *cbCasesensitive, *cbRegex;
TQListBox *lbResult;
KPushButton *btnSearch, *btnClear;
KProcess *childproc;
TDEProcess *childproc;
TQString buf;
TQString errbuf;
KConfig* config;

@ -45,7 +45,7 @@ class KFileViewItem;
class KHistoryCombo;
class KLineEdit;
class KListBox;
class KProcess;
class TDEProcess;
class KPushButton;
class KRecentFilesAction;
class KSelectAction;

@ -287,7 +287,7 @@ void Sidebar::setSplitter (Splitter *sp)
{
m_splitter = sp;
m_ownSplit = new Splitter ((position() == KMultiTabBar::Top || position() == KMultiTabBar::Bottom) ? Qt::Horizontal : Qt::Vertical, m_splitter);
m_ownSplit->setOpaqueResize( KGlobalSettings::opaqueResize() );
m_ownSplit->setOpaqueResize( TDEGlobalSettings::opaqueResize() );
m_ownSplit->setChildrenCollapsible( false );
m_splitter->setResizeMode( m_ownSplit, TQSplitter::KeepSize );
m_ownSplit->hide ();
@ -673,7 +673,7 @@ MainWindow::MainWindow (TQWidget* parentWidget, const char* name)
m_sidebars[KMultiTabBar::Left] = new Sidebar (KMultiTabBar::Left, this, hb);
m_hSplitter = new Splitter (Qt::Horizontal, hb);
m_hSplitter->setOpaqueResize( KGlobalSettings::opaqueResize() );
m_hSplitter->setOpaqueResize( TDEGlobalSettings::opaqueResize() );
m_sidebars[KMultiTabBar::Left]->setSplitter (m_hSplitter);
@ -683,7 +683,7 @@ MainWindow::MainWindow (TQWidget* parentWidget, const char* name)
m_sidebars[KMultiTabBar::Top] = new Sidebar (KMultiTabBar::Top, this, vb);
m_vSplitter = new Splitter (Qt::Vertical, vb);
m_vSplitter->setOpaqueResize( KGlobalSettings::opaqueResize() );
m_vSplitter->setOpaqueResize( TDEGlobalSettings::opaqueResize() );
m_sidebars[KMultiTabBar::Top]->setSplitter (m_vSplitter);

@ -212,16 +212,16 @@ void KateMwModOnHdDialog::slotDiff()
if ( KateDocManager::self()->documentInfo( doc )->modifiedOnDiscReason == 3 )
return;
// Start a KProcess that creates a diff
// Start a TDEProcess that creates a diff
KProcIO *p = new KProcIO();
p->setComm( KProcess::All );
p->setComm( TDEProcess::All );
*p << "diff" << "-u" << "-" << doc->url().path();
connect( p, TQT_SIGNAL(processExited(KProcess*)), this, TQT_SLOT(slotPDone(KProcess*)) );
connect( p, TQT_SIGNAL(processExited(TDEProcess*)), this, TQT_SLOT(slotPDone(TDEProcess*)) );
connect( p, TQT_SIGNAL(readReady(KProcIO*)), this, TQT_SLOT(slotPRead(KProcIO*)) );
setCursor( WaitCursor );
p->start( KProcess::NotifyOnExit, true );
p->start( TDEProcess::NotifyOnExit, true );
uint lastln = doc->numLines();
for ( uint l = 0; l < lastln; l++ )
@ -247,7 +247,7 @@ void KateMwModOnHdDialog::slotPRead( KProcIO *p)
p->ackRead();
}
void KateMwModOnHdDialog::slotPDone( KProcess *p )
void KateMwModOnHdDialog::slotPDone( TDEProcess *p )
{
setCursor( ArrowCursor );
if( ! m_tmpfile )

@ -26,7 +26,7 @@
typedef TQPtrVector<Kate::Document> DocVector;
class KProcIO;
class KProcess;
class TDEProcess;
/**
* A dialog for handling multiple documents modified on disk
* from within KateMainWindow
@ -47,7 +47,7 @@ class KateMwModOnHdDialog : public KDialogBase
void slotDiff();
void slotSelectionChanged();
void slotPRead(KProcIO*);
void slotPDone(KProcess*);
void slotPDone(TDEProcess*);
private:
enum Action { Ignore, Overwrite, Reload };

@ -48,7 +48,7 @@ public:
STATE state() const { return m_state;}
void setState(enum STATE state) {
m_state=state;
KIconLoader *loader = KGlobal::instance()->iconLoader();
KIconLoader *loader = TDEGlobal::instance()->iconLoader();
switch (state) {
case InitialState:
setPixmap(0,TQPixmap());

@ -67,7 +67,7 @@ KateSession::KateSession (KateSessionManager *manager, const TQString &fileName,
void KateSession::init ()
{
// given file exists, use it to load some stuff ;)
if (!m_sessionFileRel.isEmpty() && KGlobal::dirs()->exists(sessionFile ()))
if (!m_sessionFileRel.isEmpty() && TDEGlobal::dirs()->exists(sessionFile ()))
{
KSimpleConfig config (sessionFile (), true);
@ -146,7 +146,7 @@ bool KateSession::create (const TQString &name, bool force)
KMD5 md5 (tname);
m_sessionFileRel = TQString ("%1.katesession").arg (md5.hexDigest().data());
if (!KGlobal::dirs()->exists(sessionFile ()))
if (!TDEGlobal::dirs()->exists(sessionFile ()))
break;
}
@ -211,7 +211,7 @@ KateSessionManager::KateSessionManager (TQObject *parent)
kdDebug() << "LOCAL SESSION DIR: " << m_sessionsDir << endl;
// create dir if needed
KGlobal::dirs()->makeDir (m_sessionsDir);
TDEGlobal::dirs()->makeDir (m_sessionsDir);
}
KateSessionManager::~KateSessionManager()

@ -349,8 +349,8 @@ KateVSStatusBar::~KateVSStatusBar ()
void KateVSStatusBar::setStatus( int r, int c, int ovr, bool block, int, const TQString &msg )
{
m_lineColLabel->setText(
i18n(" Line: %1 Col: %2 ").arg(KGlobal::locale()->formatNumber(r+1, 0))
.arg(KGlobal::locale()->formatNumber(c+1, 0)) );
i18n(" Line: %1 Col: %2 ").arg(TDEGlobal::locale()->formatNumber(r+1, 0))
.arg(TDEGlobal::locale()->formatNumber(c+1, 0)) );
if (ovr == 0)
m_insertModeLabel->setText( i18n(" R/O ") );

@ -455,7 +455,7 @@ void KateViewSpaceContainer::splitViewSpace( KateViewSpace* vs,
Qt::Orientation o = isHoriz ? Qt::Vertical : Qt::Horizontal;
KateMDI::Splitter* s = new KateMDI::Splitter(o, vs->parentWidget());
s->setOpaqueResize( KGlobalSettings::opaqueResize() );
s->setOpaqueResize( TDEGlobalSettings::opaqueResize() );
if (! isFirstTime) {
// anders: make sure the split' viewspace is always

@ -593,7 +593,7 @@ extern "C" KDE_EXPORT int kdemain(int argc, char **argv)
TDEApplication a;
KGlobal::locale()->insertCatalogue("katepart");
TDEGlobal::locale()->insertCatalogue("katepart");
DCOPClient *client = kapp->dcopClient();
if (!client->isRegistered())

@ -36,7 +36,7 @@
@section Usage
To use it in the intended way:
@li Create a KProcess (or derived class)
@li Create a TDEProcess (or derived class)
@li As the output of the process arrives, hand it over
using addText(). The view will add it to the end and
make sure it is scrolled to the end.

@ -115,14 +115,14 @@ KAccessApp::KAccessApp(bool allowStyles, bool GUIenabled)
int KAccessApp::newInstance()
{
KGlobal::config()->reparseConfiguration();
TDEGlobal::config()->reparseConfiguration();
readSettings();
return 0;
}
void KAccessApp::readSettings()
{
KConfig *config = KGlobal::config();
KConfig *config = TDEGlobal::config();
// bell ---------------------------------------------------------------
@ -790,7 +790,7 @@ void KAccessApp::applyChanges() {
unsigned int enabled = requestedFeatures & ~features;
unsigned int disabled = features & ~requestedFeatures;
KConfig *config = KGlobal::config();
KConfig *config = TDEGlobal::config();
config->setGroup("Keyboard");
if (enabled & XkbSlowKeysMask)
@ -823,7 +823,7 @@ void KAccessApp::yesClicked() {
dialog->deleteLater();
dialog = 0;
KConfig *config = KGlobal::config();
KConfig *config = TDEGlobal::config();
config->setGroup("Keyboard");
switch (showModeCombobox->currentItem()) {
case 0:
@ -854,7 +854,7 @@ void KAccessApp::noClicked() {
dialog = 0;
requestedFeatures = features;
KConfig *config = KGlobal::config();
KConfig *config = TDEGlobal::config();
config->setGroup("Keyboard");
switch (showModeCombobox->currentItem()) {
case 0:

@ -578,7 +578,7 @@ void KAccessConfig::changeFlashScreenColor()
void KAccessConfig::selectSound()
{
TQStringList list = KGlobal::dirs()->findDirs("sound", "");
TQStringList list = TDEGlobal::dirs()->findDirs("sound", "");
TQString start;
if (list.count()>0)
start = list[0];

@ -57,7 +57,7 @@ extern "C" {
KDE_EXPORT KCModule *create_arts(TQWidget *parent, const char* /*name*/)
{
KGlobal::locale()->insertCatalogue("kcmarts");
TDEGlobal::locale()->insertCatalogue("kcmarts");
return new KArtsModule(parent, "kcmarts" );
}
}
@ -96,16 +96,16 @@ static bool startArts()
*/
void KArtsModule::initAudioIOList()
{
KProcess* artsd = new KProcess();
TDEProcess* artsd = new TDEProcess();
*artsd << "artsd";
*artsd << "-A";
connect(artsd, TQT_SIGNAL(processExited(KProcess*)),
this, TQT_SLOT(slotArtsdExited(KProcess*)));
connect(artsd, TQT_SIGNAL(receivedStderr(KProcess*, char*, int)),
this, TQT_SLOT(slotProcessArtsdOutput(KProcess*, char*, int)));
connect(artsd, TQT_SIGNAL(processExited(TDEProcess*)),
this, TQT_SLOT(slotArtsdExited(TDEProcess*)));
connect(artsd, TQT_SIGNAL(receivedStderr(TDEProcess*, char*, int)),
this, TQT_SLOT(slotProcessArtsdOutput(TDEProcess*, char*, int)));
if (!artsd->start(KProcess::Block, KProcess::Stderr)) {
if (!artsd->start(TDEProcess::Block, TDEProcess::Stderr)) {
KMessageBox::error(0, i18n("Unable to start the sound server to "
"retrieve possible sound I/O methods.\n"
"Only automatic detection will be "
@ -114,13 +114,13 @@ void KArtsModule::initAudioIOList()
}
}
void KArtsModule::slotArtsdExited(KProcess* proc)
void KArtsModule::slotArtsdExited(TDEProcess* proc)
{
latestProcessStatus = proc->exitStatus();
delete proc;
}
void KArtsModule::slotProcessArtsdOutput(KProcess*, char* buf, int len)
void KArtsModule::slotProcessArtsdOutput(TDEProcess*, char* buf, int len)
{
// XXX(gioele): I suppose this will be called with full lines, am I wrong?
@ -438,10 +438,10 @@ void KArtsModule::slotTestSound()
if (configChanged && (userSavedChanges() == KMessageBox::Yes) || !artsdIsRunning() )
restartServer();
KProcess test;
TDEProcess test;
test << "artsplay";
test << locate("sound", "KDE_Startup_1.ogg");
test.start(KProcess::DontCare);
test.start(TDEProcess::DontCare);
}
void KArtsModule::defaults()
@ -538,13 +538,13 @@ bool KArtsModule::realtimeIsPossible()
static bool checked = false;
if (!checked)
{
KProcess* checkProcess = new KProcess();
TDEProcess* checkProcess = new TDEProcess();
*checkProcess << "artswrapper";
*checkProcess << "check";
connect(checkProcess, TQT_SIGNAL(processExited(KProcess*)),
this, TQT_SLOT(slotArtsdExited(KProcess*)));
if (!checkProcess->start(KProcess::Block))
connect(checkProcess, TQT_SIGNAL(processExited(TDEProcess*)),
this, TQT_SLOT(slotArtsdExited(TDEProcess*)));
if (!checkProcess->start(TDEProcess::Block))
{
delete checkProcess;
realtimePossible = false;
@ -574,10 +574,10 @@ void KArtsModule::restartServer()
DCOPRef("knotify", "qt/knotify").send("quit");
// Shut down artsd
KProcess terminateArts;
TDEProcess terminateArts;
terminateArts << "artsshell";
terminateArts << "terminate";
terminateArts.start(KProcess::Block);
terminateArts.start(TDEProcess::Block);
if (starting)
{
@ -594,10 +594,10 @@ void KArtsModule::restartServer()
bool KArtsModule::artsdIsRunning()
{
KProcess check;
TDEProcess check;
check << "artsshell";
check << "status";
check.start(KProcess::Block);
check.start(TDEProcess::Block);
return (check.exitStatus() == 0);
}

@ -43,7 +43,7 @@
#include "hardwaretab.h"
class KProcess;
class TDEProcess;
class DeviceManager;
class KArtsModule : public KCModule
@ -67,8 +67,8 @@ private slots:
void slotChanged();
void slotTestSound();
void slotArtsdExited(KProcess* proc);
void slotProcessArtsdOutput(KProcess* p, char* buf, int len);
void slotArtsdExited(TDEProcess* proc);
void slotProcessArtsdOutput(TDEProcess* p, char* buf, int len);
//void slotStartServerChanged();
private:

@ -40,14 +40,14 @@ static TQString qrichtextify( const TQString& text )
KRichTextLabel::KRichTextLabel( const TQString &text , TQWidget *parent, const char *name )
: TQLabel ( parent, name ) {
m_defaultWidth = TQMIN(500, KGlobalSettings::desktopGeometry(this).width()*3/5);
m_defaultWidth = TQMIN(500, TDEGlobalSettings::desktopGeometry(this).width()*3/5);
setAlignment( TQt::WordBreak );
setText(text);
}
KRichTextLabel::KRichTextLabel( TQWidget *parent, const char *name )
: TQLabel ( parent, name ) {
m_defaultWidth = TQMIN(500, KGlobalSettings::desktopGeometry(this).width()*3/5);
m_defaultWidth = TQMIN(500, TDEGlobalSettings::desktopGeometry(this).width()*3/5);
setAlignment( TQt::WordBreak );
}

@ -69,8 +69,8 @@
BGDialog::BGDialog(TQWidget* parent, KConfig* _config, bool _multidesktop)
: BGDialog_UI(parent, "BGDialog")
{
m_pGlobals = new KGlobalBackgroundSettings(_config);
m_pDirs = KGlobal::dirs();
m_pGlobals = new TDEGlobalBackgroundSettings(_config);
m_pDirs = TDEGlobal::dirs();
m_multidesktop = _multidesktop;
m_previewUpdates = true;
@ -246,7 +246,7 @@ BGDialog::BGDialog(TQWidget* parent, KConfig* _config, bool _multidesktop)
if (m_wallpaperPos == KBackgroundSettings::NoWallpaper)
m_wallpaperPos = KBackgroundSettings::Centred; // Default
if (KGlobal::dirs()->isRestrictedResource("wallpaper"))
if (TDEGlobal::dirs()->isRestrictedResource("wallpaper"))
{
m_urlWallpaperButton->hide();
m_buttonSetupWallpapers->hide();
@ -407,7 +407,7 @@ void BGDialog::slotIdentifyScreens()
{
TQLabel *screenLabel = new TQLabel(0,"Screen Identify", (WFlags)(WDestructiveClose | WStyle_Customize | WX11BypassWM));
TQFont identifyFont(KGlobalSettings::generalFont());
TQFont identifyFont(TDEGlobalSettings::generalFont());
identifyFont.setPixelSize(100);
screenLabel->setFont(identifyFont);
@ -1244,7 +1244,7 @@ void BGDialog::slotGetNewStuff()
//FIXME set this to a server when we get one
//should really be in a .rc file but could be either
//kcmshellrc or kcontrolrc
KConfig* config = KGlobal::config();
KConfig* config = TDEGlobal::config();
config->setGroup("KNewStuff");
config->writeEntry( "ProvidersUrl", "http://download.kde.org/khotnewstuff/wallpaper-providers.xml" );
config->writeEntry( "StandardResource", "wallpaper" );

@ -83,7 +83,7 @@ protected slots:
protected:
void getEScreen();
KGlobalBackgroundSettings *m_pGlobals;
TDEGlobalBackgroundSettings *m_pGlobals;
KStandardDirs *m_pDirs;
bool m_multidesktop;
bool m_useViewports;

@ -53,7 +53,7 @@ KBackgroundRenderer::KBackgroundRenderer(int desk, int screen, bool drawBackgrou
m_State = 0;
m_isBusyCursor = false;
m_enableBusyCursor = false;
m_pDirs = KGlobal::dirs();
m_pDirs = TDEGlobal::dirs();
m_rSize = m_Size = drawBackgroundPerScreen ? TDEApplication::desktop()->screenGeometry(screen).size() : TDEApplication::desktop()->geometry().size();
m_pProc = 0L;
m_Tempfile = 0L;
@ -238,8 +238,8 @@ int KBackgroundRenderer::doBackground(bool quit)
delete m_pProc;
m_pProc = new KShellProcess;
*m_pProc << file;
connect(m_pProc, TQT_SIGNAL(processExited(KProcess *)),
TQT_SLOT(slotBackgroundDone(KProcess *)));
connect(m_pProc, TQT_SIGNAL(processExited(TDEProcess *)),
TQT_SLOT(slotBackgroundDone(TDEProcess *)));
m_pProc->start(KShellProcess::NotifyOnExit);
retval = Wait;
break;
@ -741,7 +741,7 @@ void KBackgroundRenderer::blend(TQImage& dst, TQRect dr, const TQImage& src, TQP
void KBackgroundRenderer::slotBackgroundDone(KProcess *process)
void KBackgroundRenderer::slotBackgroundDone(TDEProcess *process)
{
Q_ASSERT(process == m_pProc);
m_State |= BackgroundDone;

@ -24,7 +24,7 @@ class TQString;
class TQTimer;
class KConfig;
class KProcess;
class TDEProcess;
class KTempFile;
class KShellProcess;
class KStandardDirs;
@ -68,7 +68,7 @@ signals:
void programSuccess(int desk); //programSuccess is emitted after imageDone
private slots:
void slotBackgroundDone(KProcess *);
void slotBackgroundDone(TDEProcess *);
void render();
void done();

@ -42,7 +42,7 @@ KBackgroundPattern::KBackgroundPattern(TQString name)
dirty = false;
hashdirty = true;
m_pDirs = KGlobal::dirs();
m_pDirs = TDEGlobal::dirs();
m_pDirs->addResourceType("dtop_pattern", m_pDirs->kde_default("data") +
"kdesktop/patterns");
m_pConfig = 0L;
@ -182,7 +182,7 @@ int KBackgroundPattern::hash()
/* static */
TQStringList KBackgroundPattern::list()
{
KStandardDirs *dirs = KGlobal::dirs();
KStandardDirs *dirs = TDEGlobal::dirs();
dirs->addResourceType("dtop_pattern", dirs->kde_default("data") +
"kdesktop/patterns");
TQStringList lst = dirs->findAllResources("dtop_pattern", "*.desktop",
@ -209,7 +209,7 @@ KBackgroundProgram::KBackgroundProgram(TQString name)
dirty = false;
hashdirty = true;
m_pDirs = KGlobal::dirs();
m_pDirs = TDEGlobal::dirs();
m_pDirs->addResourceType("dtop_program", m_pDirs->kde_default("data") +
"kdesktop/programs");
m_pConfig = 0L;
@ -393,7 +393,7 @@ int KBackgroundProgram::hash()
/* static */
TQStringList KBackgroundProgram::list()
{
KStandardDirs *dirs = KGlobal::dirs();
KStandardDirs *dirs = TDEGlobal::dirs();
dirs->addResourceType("dtop_program", dirs->kde_default("data") +
"kdesktop/programs");
TQStringList lst = dirs->findAllResources("dtop_program", "*.desktop",
@ -489,7 +489,7 @@ KBackgroundSettings::KBackgroundSettings(int desk, int screen, bool drawBackgrou
ADD_STRING(NoMultiRandom)
#undef ADD_STRING
m_pDirs = KGlobal::dirs();
m_pDirs = TDEGlobal::dirs();
if (!config) {
int screen_number = 0;
@ -651,7 +651,7 @@ void KBackgroundSettings::setWallpaperMode(int mode)
void KBackgroundSettings::setWallpaperList(TQStringList list)
{
KStandardDirs *d = KGlobal::dirs();
KStandardDirs *d = TDEGlobal::dirs();
if (m_WallpaperList == list)
return;
@ -1029,7 +1029,7 @@ TQString KBackgroundSettings::fingerprint()
s += TQString("wm:%1;").arg(m_WallpaperMode);
if (m_WallpaperMode != NoWallpaper)
{
TQ_UINT32 rh = KGlobal::dirs()->calcResourceHash("wallpaper", currentWallpaper(), false);
TQ_UINT32 rh = TDEGlobal::dirs()->calcResourceHash("wallpaper", currentWallpaper(), false);
s += TQString("wp:%2:%1;").arg(rh).arg(currentWallpaper());
}
@ -1063,9 +1063,9 @@ void KBackgroundSettings::setEnabled(const bool enable)
hashdirty = true;
}
/**** KGlobalBackgroundSettings ****/
/**** TDEGlobalBackgroundSettings ****/
KGlobalBackgroundSettings::KGlobalBackgroundSettings(KConfig *_config)
TDEGlobalBackgroundSettings::TDEGlobalBackgroundSettings(KConfig *_config)
{
m_pConfig = _config;
@ -1073,14 +1073,14 @@ KGlobalBackgroundSettings::KGlobalBackgroundSettings(KConfig *_config)
}
TQString KGlobalBackgroundSettings::deskName(int desk)
TQString TDEGlobalBackgroundSettings::deskName(int desk)
{
return m_Names[desk];
}
/*
void KGlobalBackgroundSettings::setDeskName(int desk, TQString name)
void TDEGlobalBackgroundSettings::setDeskName(int desk, TQString name)
{
if (name == m_Names[desk])
return;
@ -1090,7 +1090,7 @@ void KGlobalBackgroundSettings::setDeskName(int desk, TQString name)
*/
void KGlobalBackgroundSettings::setCacheSize(int size)
void TDEGlobalBackgroundSettings::setCacheSize(int size)
{
if (size == m_CacheSize)
return;
@ -1099,7 +1099,7 @@ void KGlobalBackgroundSettings::setCacheSize(int size)
}
void KGlobalBackgroundSettings::setLimitCache(bool limit)
void TDEGlobalBackgroundSettings::setLimitCache(bool limit)
{
if (limit == m_bLimitCache)
return;
@ -1108,7 +1108,7 @@ void KGlobalBackgroundSettings::setLimitCache(bool limit)
}
bool KGlobalBackgroundSettings::drawBackgroundPerScreen(int desk) const
bool TDEGlobalBackgroundSettings::drawBackgroundPerScreen(int desk) const
{
if ( desk > int(m_bDrawBackgroundPerScreen.size()) )
return _defDrawBackgroundPerScreen;
@ -1116,7 +1116,7 @@ bool KGlobalBackgroundSettings::drawBackgroundPerScreen(int desk) const
}
void KGlobalBackgroundSettings::setDrawBackgroundPerScreen(int desk, bool perScreen)
void TDEGlobalBackgroundSettings::setDrawBackgroundPerScreen(int desk, bool perScreen)
{
if ( desk >= int(m_bDrawBackgroundPerScreen.size()) )
return;
@ -1129,7 +1129,7 @@ void KGlobalBackgroundSettings::setDrawBackgroundPerScreen(int desk, bool perScr
}
void KGlobalBackgroundSettings::setCommonScreenBackground(bool common)
void TDEGlobalBackgroundSettings::setCommonScreenBackground(bool common)
{
if (common == m_bCommonScreen)
return;
@ -1138,7 +1138,7 @@ void KGlobalBackgroundSettings::setCommonScreenBackground(bool common)
}
void KGlobalBackgroundSettings::setCommonDeskBackground(bool common)
void TDEGlobalBackgroundSettings::setCommonDeskBackground(bool common)
{
if (common == m_bCommonDesk)
return;
@ -1147,7 +1147,7 @@ void KGlobalBackgroundSettings::setCommonDeskBackground(bool common)
}
void KGlobalBackgroundSettings::setDockPanel(bool dock)
void TDEGlobalBackgroundSettings::setDockPanel(bool dock)
{
if (dock == m_bDock)
return;
@ -1156,7 +1156,7 @@ void KGlobalBackgroundSettings::setDockPanel(bool dock)
}
void KGlobalBackgroundSettings::setExportBackground(bool _export)
void TDEGlobalBackgroundSettings::setExportBackground(bool _export)
{
if (_export == m_bExport)
return;
@ -1164,7 +1164,7 @@ void KGlobalBackgroundSettings::setExportBackground(bool _export)
m_bExport = _export;
}
void KGlobalBackgroundSettings::setTextColor(TQColor _color)
void TDEGlobalBackgroundSettings::setTextColor(TQColor _color)
{
if (_color == m_TextColor)
return;
@ -1172,7 +1172,7 @@ void KGlobalBackgroundSettings::setTextColor(TQColor _color)
m_TextColor = _color;
}
void KGlobalBackgroundSettings::setTextBackgroundColor(TQColor _color)
void TDEGlobalBackgroundSettings::setTextBackgroundColor(TQColor _color)
{
if (_color == m_TextBackgroundColor)
return;
@ -1180,7 +1180,7 @@ void KGlobalBackgroundSettings::setTextBackgroundColor(TQColor _color)
m_TextBackgroundColor = _color;
}
void KGlobalBackgroundSettings::setShadowEnabled(bool enabled)
void TDEGlobalBackgroundSettings::setShadowEnabled(bool enabled)
{
if (enabled == m_shadowEnabled)
return;
@ -1188,7 +1188,7 @@ void KGlobalBackgroundSettings::setShadowEnabled(bool enabled)
m_shadowEnabled = enabled;
}
void KGlobalBackgroundSettings::setTextLines(int lines)
void TDEGlobalBackgroundSettings::setTextLines(int lines)
{
if (lines == m_textLines)
return;
@ -1196,7 +1196,7 @@ void KGlobalBackgroundSettings::setTextLines(int lines)
m_textLines = lines;
}
void KGlobalBackgroundSettings::setTextWidth(int width)
void TDEGlobalBackgroundSettings::setTextWidth(int width)
{
if (width == m_textWidth)
return;
@ -1204,7 +1204,7 @@ void KGlobalBackgroundSettings::setTextWidth(int width)
m_textWidth = width;
}
void KGlobalBackgroundSettings::readSettings()
void TDEGlobalBackgroundSettings::readSettings()
{
m_pConfig->setGroup("Background Common");
m_bCommonScreen = m_pConfig->readBoolEntry("CommonScreen", _defCommonScreen);
@ -1220,7 +1220,7 @@ void KGlobalBackgroundSettings::readSettings()
for ( int i = 0 ; i < info.numberOfDesktops() ; ++i )
m_bDrawBackgroundPerScreen[i] = m_pConfig->readBoolEntry( TQString("DrawBackgroundPerScreen_%1").arg(i), _defDrawBackgroundPerScreen );
m_TextColor = KGlobalSettings::textColor();
m_TextColor = TDEGlobalSettings::textColor();
m_pConfig->setGroup("FMSettings");
m_TextColor = m_pConfig->readColorEntry("NormalTextColor", &m_TextColor);
m_TextBackgroundColor = m_pConfig->readColorEntry("ItemTextBackground");
@ -1234,7 +1234,7 @@ void KGlobalBackgroundSettings::readSettings()
dirty = false;
}
void KGlobalBackgroundSettings::writeSettings()
void TDEGlobalBackgroundSettings::writeSettings()
{
if (!dirty)
return;

@ -302,10 +302,10 @@ public:
/**
* A class to read/modify the global desktop background settings.
*/
class KGlobalBackgroundSettings
class TDEGlobalBackgroundSettings
{
public:
KGlobalBackgroundSettings(KConfig *config);
TDEGlobalBackgroundSettings(KConfig *config);
TQString deskName(int desk);
//void setDeskName(int desk, TQString name);