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; if ( m_polished ) return;
item()->list()->polishing(); item()->list()->polishing();
kdDebug() << "polish for " << entity().name() << endl; 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() ) { 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() : m_icon->setPixmap( icon.isNull() ? item()->list()->emptyIcon() :
TQPixmap( icon.smoothScale( 32, 32, TQ_ScaleMin ) ) ); TQPixmap( icon.smoothScale( 32, 32, TQ_ScaleMin ) ) );
@ -148,7 +148,7 @@ DesktopList::DesktopList( TQWidget *parent, const char *name )
setExtenderHighlight( true ); setExtenderHighlight( true );
m_emptyIcon = TQPixmap( m_emptyIcon = TQPixmap(
TQImage( TQImage(
KGlobal::iconLoader()->iconPath( u8( "exec" ), -32, false ) TDEGlobal::iconLoader()->iconPath( u8( "exec" ), -32, false )
).smoothScale( 32, 32, TQ_ScaleMin ) ); ).smoothScale( 32, 32, TQ_ScaleMin ) );
connect( this, TQT_SIGNAL( clicked( TQListViewItem *, const TQPoint &, int ) ), connect( this, TQT_SIGNAL( clicked( TQListViewItem *, const TQPoint &, int ) ),
this, TQT_SLOT( processClick( 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] ); l.append( argv[i] );
m_processRunning = true; m_processRunning = true;
connect( m_terminalPart, TQT_SIGNAL( processExited( KProcess * ) ), connect( m_terminalPart, TQT_SIGNAL( processExited( TDEProcess * ) ),
this, TQT_SLOT( processExit( KProcess * ) ) ); this, TQT_SLOT( processExit( TDEProcess * ) ) );
connect( m_terminalPart, TQT_SIGNAL( processExited( const KProcess * ) ), connect( m_terminalPart, TQT_SIGNAL( processExited( const TDEProcess * ) ),
this, TQT_SLOT( processExitC( const KProcess * ) ) ); this, TQT_SLOT( processExitC( const TDEProcess * ) ) );
connect( m_terminalPart, TQT_SIGNAL( forkedChild() ), connect( m_terminalPart, TQT_SIGNAL( forkedChild() ),
this, TQT_SLOT( setupDpkgChild() ) ); this, TQT_SLOT( setupDpkgChild() ) );
@ -119,10 +119,10 @@ bool DPkgPM::forkScript (const char *cmd, bool fP)
this, TQT_SLOT( setupScriptPipe() ) ); this, TQT_SLOT( setupScriptPipe() ) );
} }
connect( m_terminalPart, TQT_SIGNAL( processExited( KProcess * ) ), connect( m_terminalPart, TQT_SIGNAL( processExited( TDEProcess * ) ),
this, TQT_SLOT( processExit( KProcess * ) ) ); this, TQT_SLOT( processExit( TDEProcess * ) ) );
connect( m_terminalPart, TQT_SIGNAL( processExited( const KProcess * ) ), connect( m_terminalPart, TQT_SIGNAL( processExited( const TDEProcess * ) ),
this, TQT_SLOT( processExitC( const KProcess * ) ) ); this, TQT_SLOT( processExitC( const TDEProcess * ) ) );
m_processRunning = true; m_processRunning = true;
terminal()->startProgram( u8( "/bin/sh" ), l); 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 ); processExitC( p );
} }
void DPkgPM::processExitC(const KProcess *p) void DPkgPM::processExitC(const TDEProcess *p)
{ {
std::cerr << "a process exited!" << std::endl; std::cerr << "a process exited!" << std::endl;
m_processRunning = false; m_processRunning = false;

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

@ -288,7 +288,7 @@ void ExtendableItem::paintBranches( TQPainter *p,
{ {
/* if (!isAlternate()) /* if (!isAlternate())
p->setBackgroundColor( p->setBackgroundColor(
KGlobalSettings::alternateBackgroundColor() ); TDEGlobalSettings::alternateBackgroundColor() );
p->eraseRect( 0, y, w, h ); */ p->eraseRect( 0, y, w, h ); */
p->eraseRect( 0, 0, w, h ); p->eraseRect( 0, 0, w, h );
} }
@ -308,7 +308,7 @@ static void setcolor( TQWidget *w, ExtendableItem *i ) {
w->setPaletteBackgroundColor( w->colorGroup().highlight() ); w->setPaletteBackgroundColor( w->colorGroup().highlight() );
else if ( i->isAlternate() ) else if ( i->isAlternate() )
w->setPaletteBackgroundColor( w->setPaletteBackgroundColor(
KGlobalSettings::alternateBackgroundColor() ); TDEGlobalSettings::alternateBackgroundColor() );
else else
w->setPaletteBackgroundColor( w->colorGroup().base() ); w->setPaletteBackgroundColor( w->colorGroup().base() );
// w->setBackgroundMode( TQWidget::PaletteBase ); // 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; std::cerr << "group for " << cr->name() << ": " << r->group() << std::endl;
name = ( name != u8( "" ) ? name : u8( "Legacy" ) ); name = ( name != u8( "" ) ? name : u8( "Legacy" ) );
TQPixmap icon( KGlobal::iconLoader()->iconPath( TQPixmap icon( TDEGlobal::iconLoader()->iconPath(
policy() ? policy()->iconForGroup( name ) : u8( "" ), -32 ) ); policy() ? policy()->iconForGroup( name ) : u8( "" ), -32 ) );
TQVBox *b = addVBoxPage( name, name, icon ); TQVBox *b = addVBoxPage( name, name, icon );

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

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

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

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

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

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

@ -74,9 +74,9 @@ void DesktopEntry::showEvent( TQShowEvent *e ) {
if ( m_polished ) return; if ( m_polished ) return;
item()->list()->polishing(); item()->list()->polishing();
kdDebug() << "polish for " << entity().name() << endl; 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() ) { 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() : m_icon->setPixmap( icon.isNull() ? item()->list()->emptyIcon() :
TQPixmap( icon.smoothScale( 32, 32, TQ_ScaleMin ) ) ); TQPixmap( icon.smoothScale( 32, 32, TQ_ScaleMin ) ) );
@ -148,7 +148,7 @@ DesktopList::DesktopList( TQWidget *parent, const char *name )
setExtenderHighlight( true ); setExtenderHighlight( true );
m_emptyIcon = TQPixmap( m_emptyIcon = TQPixmap(
TQImage( TQImage(
KGlobal::iconLoader()->iconPath( u8( "exec" ), -32, false ) TDEGlobal::iconLoader()->iconPath( u8( "exec" ), -32, false )
).smoothScale( 32, 32, TQ_ScaleMin ) ); ).smoothScale( 32, 32, TQ_ScaleMin ) );
connect( this, TQT_SIGNAL( clicked( TQListViewItem *, const TQPoint &, int ) ), connect( this, TQT_SIGNAL( clicked( TQListViewItem *, const TQPoint &, int ) ),
this, TQT_SLOT( processClick( 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] ); l.append( argv[i] );
m_processRunning = true; m_processRunning = true;
connect( m_terminalPart, TQT_SIGNAL( processExited( KProcess * ) ), connect( m_terminalPart, TQT_SIGNAL( processExited( TDEProcess * ) ),
this, TQT_SLOT( processExit( KProcess * ) ) ); this, TQT_SLOT( processExit( TDEProcess * ) ) );
connect( m_terminalPart, TQT_SIGNAL( processExited( const KProcess * ) ), connect( m_terminalPart, TQT_SIGNAL( processExited( const TDEProcess * ) ),
this, TQT_SLOT( processExitC( const KProcess * ) ) ); this, TQT_SLOT( processExitC( const TDEProcess * ) ) );
connect( m_terminalPart, TQT_SIGNAL( forkedChild() ), connect( m_terminalPart, TQT_SIGNAL( forkedChild() ),
this, TQT_SLOT( setupDpkgChild() ) ); this, TQT_SLOT( setupDpkgChild() ) );
@ -119,10 +119,10 @@ bool DPkgPM::forkScript (const char *cmd, bool fP)
this, TQT_SLOT( setupScriptPipe() ) ); this, TQT_SLOT( setupScriptPipe() ) );
} }
connect( m_terminalPart, TQT_SIGNAL( processExited( KProcess * ) ), connect( m_terminalPart, TQT_SIGNAL( processExited( TDEProcess * ) ),
this, TQT_SLOT( processExit( KProcess * ) ) ); this, TQT_SLOT( processExit( TDEProcess * ) ) );
connect( m_terminalPart, TQT_SIGNAL( processExited( const KProcess * ) ), connect( m_terminalPart, TQT_SIGNAL( processExited( const TDEProcess * ) ),
this, TQT_SLOT( processExitC( const KProcess * ) ) ); this, TQT_SLOT( processExitC( const TDEProcess * ) ) );
m_processRunning = true; m_processRunning = true;
terminal()->startProgram( u8( "/bin/sh" ), l); 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 ); processExitC( p );
} }
void DPkgPM::processExitC(const KProcess *p) void DPkgPM::processExitC(const TDEProcess *p)
{ {
std::cerr << "a process exited!" << std::endl; std::cerr << "a process exited!" << std::endl;
m_processRunning = false; m_processRunning = false;

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

@ -281,7 +281,7 @@ void ExtendableItem::paintBranches( TQPainter *p,
{ {
/* if (!isAlternate()) /* if (!isAlternate())
p->setBackgroundColor( p->setBackgroundColor(
KGlobalSettings::alternateBackgroundColor() ); TDEGlobalSettings::alternateBackgroundColor() );
p->eraseRect( 0, y, w, h ); */ p->eraseRect( 0, y, w, h ); */
p->eraseRect( 0, 0, w, h ); p->eraseRect( 0, 0, w, h );
} }
@ -301,7 +301,7 @@ static void setcolor( TQWidget *w, ExtendableItem *i ) {
w->setPaletteBackgroundColor( w->colorGroup().highlight() ); w->setPaletteBackgroundColor( w->colorGroup().highlight() );
else if ( i->isAlternate() ) else if ( i->isAlternate() )
w->setPaletteBackgroundColor( w->setPaletteBackgroundColor(
KGlobalSettings::alternateBackgroundColor() ); TDEGlobalSettings::alternateBackgroundColor() );
else else
w->setPaletteBackgroundColor( w->colorGroup().base() ); w->setPaletteBackgroundColor( w->colorGroup().base() );
// w->setBackgroundMode( TQWidget::PaletteBase ); // 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; std::cerr << "group for " << cr->name() << ": " << r->group() << std::endl;
name = ( name != u8( "" ) ? name : u8( "Legacy" ) ); name = ( name != u8( "" ) ? name : u8( "Legacy" ) );
TQPixmap icon( KGlobal::iconLoader()->iconPath( TQPixmap icon( TDEGlobal::iconLoader()->iconPath(
policy() ? policy()->iconForGroup( name ) : u8( "" ), -32 ) ); policy() ? policy()->iconForGroup( name ) : u8( "" ), -32 ) );
TQVBox *b = addVBoxPage( name, name, icon ); TQVBox *b = addVBoxPage( name, name, icon );

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

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

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

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

Loading…
Cancel
Save