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

master
Timothy Pearson 11 years ago
parent ddccba6852
commit 2258bd412b

@ -74,9 +74,9 @@ void DesktopEntry::showEvent( TQShowEvent *e ) {
if ( m_polished ) return;
item()->list()->polishing();
kdDebug() << "polish for " << entity().name() << endl;
TQImage icon( KGlobal::iconLoader()->iconPath( entity().icon(), -32, true ) );
TQImage icon( TDEGlobal::iconLoader()->iconPath( entity().icon(), -32, true ) );
if ( icon.isNull() ) {
icon = TQImage( KGlobal::dirs()->findResource( "desktopicon", entity().icon() ) );
icon = TQImage( TDEGlobal::dirs()->findResource( "desktopicon", entity().icon() ) );
}
m_icon->setPixmap( icon.isNull() ? item()->list()->emptyIcon() :
TQPixmap( icon.smoothScale( 32, 32, TQ_ScaleMin ) ) );
@ -148,7 +148,7 @@ DesktopList::DesktopList( TQWidget *parent, const char *name )
setExtenderHighlight( true );
m_emptyIcon = TQPixmap(
TQImage(
KGlobal::iconLoader()->iconPath( u8( "exec" ), -32, false )
TDEGlobal::iconLoader()->iconPath( u8( "exec" ), -32, false )
).smoothScale( 32, 32, TQ_ScaleMin ) );
connect( this, TQT_SIGNAL( clicked( TQListViewItem *, const TQPoint &, int ) ),
this, TQT_SLOT( processClick( TQListViewItem *, const TQPoint &, int ) ) );

@ -62,10 +62,10 @@ bool DPkgPM::forkDpkg( char *const argv[] )
l.append( argv[i] );
m_processRunning = true;
connect( m_terminalPart, TQT_SIGNAL( processExited( KProcess * ) ),
this, TQT_SLOT( processExit( KProcess * ) ) );
connect( m_terminalPart, TQT_SIGNAL( processExited( const KProcess * ) ),
this, TQT_SLOT( processExitC( const KProcess * ) ) );
connect( m_terminalPart, TQT_SIGNAL( processExited( TDEProcess * ) ),
this, TQT_SLOT( processExit( TDEProcess * ) ) );
connect( m_terminalPart, TQT_SIGNAL( processExited( const TDEProcess * ) ),
this, TQT_SLOT( processExitC( const TDEProcess * ) ) );
connect( m_terminalPart, TQT_SIGNAL( forkedChild() ),
this, TQT_SLOT( setupDpkgChild() ) );
@ -119,10 +119,10 @@ bool DPkgPM::forkScript (const char *cmd, bool fP)
this, TQT_SLOT( setupScriptPipe() ) );
}
connect( m_terminalPart, TQT_SIGNAL( processExited( KProcess * ) ),
this, TQT_SLOT( processExit( KProcess * ) ) );
connect( m_terminalPart, TQT_SIGNAL( processExited( const KProcess * ) ),
this, TQT_SLOT( processExitC( const KProcess * ) ) );
connect( m_terminalPart, TQT_SIGNAL( processExited( TDEProcess * ) ),
this, TQT_SLOT( processExit( TDEProcess * ) ) );
connect( m_terminalPart, TQT_SIGNAL( processExited( const TDEProcess * ) ),
this, TQT_SLOT( processExitC( const TDEProcess * ) ) );
m_processRunning = true;
terminal()->startProgram( u8( "/bin/sh" ), l);
@ -153,11 +153,11 @@ bool DPkgPM::forkScript (const char *cmd, bool fP)
}
}
void DPkgPM::processExit(KProcess *p) {
void DPkgPM::processExit(TDEProcess *p) {
processExitC( p );
}
void DPkgPM::processExitC(const KProcess *p)
void DPkgPM::processExitC(const TDEProcess *p)
{
std::cerr << "a process exited!" << std::endl;
m_processRunning = false;

@ -50,8 +50,8 @@ public:
virtual void updateStatus( std::string pkg, std::string ev, std::string r );
public slots:
void processExitC(const KProcess *p);
void processExit(KProcess *p);
void processExitC(const TDEProcess *p);
void processExit(TDEProcess *p);
void setupScriptPipe();
void setupDpkgChild();
@ -62,7 +62,7 @@ protected:
KParts::Part *m_terminalPart;
// DPkgProgress *m_prog;
bool m_processRunning:1;
const KProcess *m_exitedProcess;
const TDEProcess *m_exitedProcess;
};
}

@ -288,7 +288,7 @@ void ExtendableItem::paintBranches( TQPainter *p,
{
/* if (!isAlternate())
p->setBackgroundColor(
KGlobalSettings::alternateBackgroundColor() );
TDEGlobalSettings::alternateBackgroundColor() );
p->eraseRect( 0, y, w, h ); */
p->eraseRect( 0, 0, w, h );
}
@ -308,7 +308,7 @@ static void setcolor( TQWidget *w, ExtendableItem *i ) {
w->setPaletteBackgroundColor( w->colorGroup().highlight() );
else if ( i->isAlternate() )
w->setPaletteBackgroundColor(
KGlobalSettings::alternateBackgroundColor() );
TDEGlobalSettings::alternateBackgroundColor() );
else
w->setPaletteBackgroundColor( w->colorGroup().base() );
// w->setBackgroundMode( TQWidget::PaletteBase );

@ -101,7 +101,7 @@ void GroupedDesktopSelector::fill( component::Desktop::EntityRange r )
std::cerr << "group for " << cr->name() << ": " << r->group() << std::endl;
name = ( name != u8( "" ) ? name : u8( "Legacy" ) );
TQPixmap icon( KGlobal::iconLoader()->iconPath(
TQPixmap icon( TDEGlobal::iconLoader()->iconPath(
policy() ? policy()->iconForGroup( name ) : u8( "" ), -32 ) );
TQVBox *b = addVBoxPage( name, name, icon );

@ -37,7 +37,7 @@ int main(int argc, char *argv[])
TDEApplication app;
TDECmdLineArgs* args = TDECmdLineArgs::parsedArgs();
KGlobal::locale()->insertCatalogue(TQString::fromUtf8("libept"));
TDEGlobal::locale()->insertCatalogue(TQString::fromUtf8("libept"));
App *ta = new App( args );

@ -149,7 +149,7 @@ void App::delayed() {
initialize();
cache().addComponent( new component::Desktop() );
KGlobal::dirs()->addResourceDir(
TDEGlobal::dirs()->addResourceDir(
"desktopicon",
u8( INSTALLER_DATA "/icons/" ) );
@ -364,7 +364,7 @@ void App::disableButtons() {
}
void App::editSources() {
KProcess* softwarePropertiesProcess = new KProcess(TQT_TQOBJECT(this));
TDEProcess* softwarePropertiesProcess = new TDEProcess(TQT_TQOBJECT(this));
*softwarePropertiesProcess << "/usr/bin/software-properties-kde";
softwarePropertiesProcess->start();
}

@ -19,7 +19,7 @@ class TQWidgetStack;
class TQSplitter;
class KAction;
class KPushButton;
class KProcess;
class TDEProcess;
namespace adept {
class AcqProgressWidget;
}

@ -40,7 +40,7 @@ int main(int argc, char *argv[])
TDECmdLineArgs* args = TDECmdLineArgs::parsedArgs();
KGlobal::locale()->insertCatalogue(TQString::fromUtf8("libept"));
TDEGlobal::locale()->insertCatalogue(TQString::fromUtf8("libept"));
App *ta = new App();

@ -151,7 +151,7 @@ bool UpgradeWizard::checkForDistUpgrade(TQString url, bool developmentVersion) {
}
bool upgrade_available = false;
KConfig* config = KGlobal::config();
KConfig* config = TDEGlobal::config();
config->setGroup("General Settings");
TQString upgradeURL;
upgradeURL = config->readEntry(TQString("upgradeURL"), url);
@ -166,12 +166,12 @@ bool UpgradeWizard::checkForDistUpgrade(TQString url, bool developmentVersion) {
// need to spawn a process to call lsb_release -c -s
// to find out which version of kubuntu we are using
KProcess *proc = new KProcess;
TDEProcess *proc = new TDEProcess;
*proc << "lsb_release";
*proc << "-c" << "-s";
connect(proc, TQT_SIGNAL( receivedStdout( KProcess*, char *, int ) ),
this, TQT_SLOT( receiveDistroName( KProcess*, char *, int ) ) );
proc->start( KProcess::Block, KProcess::Stdout );
connect(proc, TQT_SIGNAL( receivedStdout( TDEProcess*, char *, int ) ),
this, TQT_SLOT( receiveDistroName( TDEProcess*, char *, int ) ) );
proc->start( TDEProcess::Block, TDEProcess::Stdout );
current_dist = 0;
TQPtrList<DistroEntry> *entry_list = parseMetafile( temp_file_stream, distro_name );
@ -390,7 +390,7 @@ TQPtrList<DistroEntry> *UpgradeWizard::parseMetafile( TQTextIStream *text_stream
// ** SLOTS ** //
void UpgradeWizard::receiveDistroName( KProcess*, char *buffer, int buflen ) {
void UpgradeWizard::receiveDistroName( TDEProcess*, char *buffer, int buflen ) {
distro_name = TQString::fromAscii( buffer, buflen-1 );
}
@ -404,11 +404,11 @@ void UpgradeWizard::launchDistUpdater() {
//tarDirectory->copyTo(upgrade_tool_location+"-extract");
tarFile.directory()->copyTo(upgrade_tool_location+"-extract", true);
KProcess *proc = new KProcess;
TDEProcess *proc = new TDEProcess;
proc->setWorkingDirectory(upgrade_tool_location+"-extract");
*proc << "python" << upgrade_tool_location+"-extract/dist-upgrade.py";
*proc << "--frontend" << "DistUpgradeViewKDE";
proc->start( KProcess::DontCare );
proc->start( TDEProcess::DontCare );
// don't kill adept, it stops the app from running
// parentWidget()->close();
@ -486,11 +486,11 @@ void UpgradeWizard::fetchUpgradeToolSig() {
void UpgradeWizard::verifyUpgradeTool() {
// spawn a process to call gpg and verify the signature
KProcess *proc = new KProcess;
TDEProcess *proc = new TDEProcess;
*proc << "gpg";
*proc << "--keyring" << "/etc/apt/trusted.gpg" << "--verify" << upgrade_tool_sig_location << upgrade_tool_location;
proc->start( KProcess::Block, KProcess::Stdout );
proc->start( TDEProcess::Block, TDEProcess::Stdout );
// signature verification successful if gpg exist status = 0
if( proc->exitStatus() == 0 ) {
emit killErrorDialog();

@ -26,7 +26,7 @@
class TQString;
class TQTextIStream;
class TQDateTime;
class KProcess;
class TDEProcess;
class KURL;
class ErrorDialog;
@ -63,7 +63,7 @@ public:
public slots:
/*$PUBLIC_SLOTS$*/
void receiveDistroName( KProcess* p, char *buffer, int buflen );
void receiveDistroName( TDEProcess* p, char *buffer, int buflen );
void launchDistUpdater();
void fetchReleaseAnnounce();
void fetchUpgradeTool();

@ -74,9 +74,9 @@ void DesktopEntry::showEvent( TQShowEvent *e ) {
if ( m_polished ) return;
item()->list()->polishing();
kdDebug() << "polish for " << entity().name() << endl;
TQImage icon( KGlobal::iconLoader()->iconPath( entity().icon(), -32, true ) );
TQImage icon( TDEGlobal::iconLoader()->iconPath( entity().icon(), -32, true ) );
if ( icon.isNull() ) {
icon = TQImage( KGlobal::dirs()->findResource( "desktopicon", entity().icon() ) );
icon = TQImage( TDEGlobal::dirs()->findResource( "desktopicon", entity().icon() ) );
}
m_icon->setPixmap( icon.isNull() ? item()->list()->emptyIcon() :
TQPixmap( icon.smoothScale( 32, 32, TQ_ScaleMin ) ) );
@ -148,7 +148,7 @@ DesktopList::DesktopList( TQWidget *parent, const char *name )
setExtenderHighlight( true );
m_emptyIcon = TQPixmap(
TQImage(
KGlobal::iconLoader()->iconPath( u8( "exec" ), -32, false )
TDEGlobal::iconLoader()->iconPath( u8( "exec" ), -32, false )
).smoothScale( 32, 32, TQ_ScaleMin ) );
connect( this, TQT_SIGNAL( clicked( TQListViewItem *, const TQPoint &, int ) ),
this, TQT_SLOT( processClick( TQListViewItem *, const TQPoint &, int ) ) );

@ -62,10 +62,10 @@ bool DPkgPM::forkDpkg( char *const argv[] )
l.append( argv[i] );
m_processRunning = true;
connect( m_terminalPart, TQT_SIGNAL( processExited( KProcess * ) ),
this, TQT_SLOT( processExit( KProcess * ) ) );
connect( m_terminalPart, TQT_SIGNAL( processExited( const KProcess * ) ),
this, TQT_SLOT( processExitC( const KProcess * ) ) );
connect( m_terminalPart, TQT_SIGNAL( processExited( TDEProcess * ) ),
this, TQT_SLOT( processExit( TDEProcess * ) ) );
connect( m_terminalPart, TQT_SIGNAL( processExited( const TDEProcess * ) ),
this, TQT_SLOT( processExitC( const TDEProcess * ) ) );
connect( m_terminalPart, TQT_SIGNAL( forkedChild() ),
this, TQT_SLOT( setupDpkgChild() ) );
@ -119,10 +119,10 @@ bool DPkgPM::forkScript (const char *cmd, bool fP)
this, TQT_SLOT( setupScriptPipe() ) );
}
connect( m_terminalPart, TQT_SIGNAL( processExited( KProcess * ) ),
this, TQT_SLOT( processExit( KProcess * ) ) );
connect( m_terminalPart, TQT_SIGNAL( processExited( const KProcess * ) ),
this, TQT_SLOT( processExitC( const KProcess * ) ) );
connect( m_terminalPart, TQT_SIGNAL( processExited( TDEProcess * ) ),
this, TQT_SLOT( processExit( TDEProcess * ) ) );
connect( m_terminalPart, TQT_SIGNAL( processExited( const TDEProcess * ) ),
this, TQT_SLOT( processExitC( const TDEProcess * ) ) );
m_processRunning = true;
terminal()->startProgram( u8( "/bin/sh" ), l);
@ -153,11 +153,11 @@ bool DPkgPM::forkScript (const char *cmd, bool fP)
}
}
void DPkgPM::processExit(KProcess *p) {
void DPkgPM::processExit(TDEProcess *p) {
processExitC( p );
}
void DPkgPM::processExitC(const KProcess *p)
void DPkgPM::processExitC(const TDEProcess *p)
{
std::cerr << "a process exited!" << std::endl;
m_processRunning = false;

@ -50,8 +50,8 @@ public:
virtual void updateStatus( std::string pkg, std::string ev, std::string r );
public slots:
void processExitC(const KProcess *p);
void processExit(KProcess *p);
void processExitC(const TDEProcess *p);
void processExit(TDEProcess *p);
void setupScriptPipe();
void setupDpkgChild();
@ -62,7 +62,7 @@ protected:
KParts::Part *m_terminalPart;
// DPkgProgress *m_prog;
bool m_processRunning:1;
const KProcess *m_exitedProcess;
const TDEProcess *m_exitedProcess;
};
}

@ -281,7 +281,7 @@ void ExtendableItem::paintBranches( TQPainter *p,
{
/* if (!isAlternate())
p->setBackgroundColor(
KGlobalSettings::alternateBackgroundColor() );
TDEGlobalSettings::alternateBackgroundColor() );
p->eraseRect( 0, y, w, h ); */
p->eraseRect( 0, 0, w, h );
}
@ -301,7 +301,7 @@ static void setcolor( TQWidget *w, ExtendableItem *i ) {
w->setPaletteBackgroundColor( w->colorGroup().highlight() );
else if ( i->isAlternate() )
w->setPaletteBackgroundColor(
KGlobalSettings::alternateBackgroundColor() );
TDEGlobalSettings::alternateBackgroundColor() );
else
w->setPaletteBackgroundColor( w->colorGroup().base() );
// w->setBackgroundMode( TQWidget::PaletteBase );

@ -101,7 +101,7 @@ void GroupedDesktopSelector::fill( component::Desktop::EntityRange r )
std::cerr << "group for " << cr->name() << ": " << r->group() << std::endl;
name = ( name != u8( "" ) ? name : u8( "Legacy" ) );
TQPixmap icon( KGlobal::iconLoader()->iconPath(
TQPixmap icon( TDEGlobal::iconLoader()->iconPath(
policy() ? policy()->iconForGroup( name ) : u8( "" ), -32 ) );
TQVBox *b = addVBoxPage( name, name, icon );

@ -41,12 +41,12 @@ int main(int argc, char *argv[])
TDECmdLineArgs* args = TDECmdLineArgs::parsedArgs();
// if (args && args->isSet("xy")) ...
/* KConfig* config = KGlobal::config();
/* KConfig* config = TDEGlobal::config();
config->setGroup("General Settings");
TQString version = config->readEntry("Version"); */
KGlobal::locale()->insertCatalogue(TQString::fromUtf8("libept"));
KGlobal::locale()->insertCatalogue(TQString::fromUtf8("libapt-front"));
TDEGlobal::locale()->insertCatalogue(TQString::fromUtf8("libept"));
TDEGlobal::locale()->insertCatalogue(TQString::fromUtf8("libapt-front"));
TestApp *ta = new TestApp();

@ -162,10 +162,10 @@ NotifierApp::NotifierApp(bool allowStyles, bool GUIenabled)
m_dirWatch->addDir(TQString("/var/crash"));
connect( m_dirWatch, TQT_SIGNAL( dirty(const TQString&) ), this, TQT_SLOT( crashWatcher() ) );
KProcess *proc = new KProcess;
TDEProcess *proc = new TDEProcess;
*proc << "/usr/share/apport/apport-checkreports";
connect( proc, TQT_SIGNAL(processExited(KProcess*)), this, TQT_SLOT(apportCheckExited(KProcess*)) );
proc->start(KProcess::Block);
connect( proc, TQT_SIGNAL(processExited(TDEProcess*)), this, TQT_SLOT(apportCheckExited(TDEProcess*)) );
proc->start(TDEProcess::Block);
if (m_crashes) {
ApportTrayWindow* crashApplet = new ApportTrayWindow;
@ -194,24 +194,24 @@ NotifierApp::NotifierApp(bool allowStyles, bool GUIenabled)
void NotifierApp::crashWatcher() {
// find out if there are system crash reports first, if there are run it as root
KProcess *proc = new KProcess;
TDEProcess *proc = new TDEProcess;
*proc << "/usr/share/apport/apport-checkreports";
*proc << "--system";
connect( proc, TQT_SIGNAL(processExited(KProcess*)), this, TQT_SLOT(apportCheckExited(KProcess*)) );
proc->start(KProcess::Block);
connect( proc, TQT_SIGNAL(processExited(TDEProcess*)), this, TQT_SLOT(apportCheckExited(TDEProcess*)) );
proc->start(TDEProcess::Block);
if (m_crashes) {
KProcess *proc2 = new KProcess;
TDEProcess *proc2 = new TDEProcess;
*proc2 << "tdesu" << "/usr/share/apport/apport-qt";
proc2->start(KProcess::DontCare);
proc2->start(TDEProcess::DontCare);
} else {
KShellProcess *proc2 = new KShellProcess;
*proc2 << "sleep 1; /usr/share/apport/apport-qt"; //needs a seconds delay else we're too fast for apport
proc2->start(KProcess::DontCare);
proc2->start(TDEProcess::DontCare);
}
}
void NotifierApp::apportCheckExited(KProcess* proc) {
void NotifierApp::apportCheckExited(TDEProcess* proc) {
if (proc->exitStatus() == 0) {
m_crashes = true;
} else {
@ -246,7 +246,7 @@ void NotifierApp::rebootClicked() {
kdDebug() << "NotifierApp::rebootClicked" << endl;
if (KMessageBox::questionYesNo(0, TQString("In order to complete the update your system needs to be restarted."), TQString("Restart Require")) == KMessageBox::Yes) {
kdDebug() << "NotifierApp::rebootClicked yes!" << endl;
KProcess *proc = new KProcess;
TDEProcess *proc = new TDEProcess;
*proc << "/usr/bin/dcop";
*proc << "ksmserver" << "ksmserver" << "logout" << "0" << "1" << "2"; // 0 1 2 == ShutdownConfirmNo ShutdownTypeReboot ShutdownModeForceNow
proc->start();

@ -9,7 +9,7 @@
class TQWidget;
class KAction;
// class KGlobalAccel;
// class TDEGlobalAccel;
// the status indicator in system tray
class TrayWindow : public KSystemTray
@ -80,7 +80,7 @@ protected slots:
void about();
// for apport
void crashWatcher();
void apportCheckExited(KProcess*);
void apportCheckExited(TDEProcess*);
void rebootWatcher(const TQString& path);
void rebootClicked();

@ -41,11 +41,11 @@ int main(int argc, char *argv[])
TDECmdLineArgs* args = TDECmdLineArgs::parsedArgs();
// if (args && args->isSet("xy")) ...
/* KConfig* config = KGlobal::config();
/* KConfig* config = TDEGlobal::config();
config->setGroup("General Settings");
TQString version = config->readEntry("Version"); */
KGlobal::locale()->insertCatalogue(TQString::fromUtf8("libept"));
TDEGlobal::locale()->insertCatalogue(TQString::fromUtf8("libept"));
TestApp *ta = new TestApp();

Loading…
Cancel
Save