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

pull/1/head
Timothy Pearson 12 years ago
parent 384d177b84
commit 8874c8d8f7

@ -57,7 +57,7 @@
2007-09-11 Danny Kukawka <danny.kukawka@web.de>
* src/screen.cpp: Fixed b.n.c #309491. Fixed code to free
KProcess object if gnome-screensaver is running (which
TDEProcess object if gnome-screensaver is running (which
mean unfortunately GNOME is running).
2007-09-11 Danny Kukawka <danny.kukawka@web.de>

@ -76,13 +76,13 @@ void countDownDialog::setPixmap( TQString type )
TQPixmap pixmap = 0;
if(type.startsWith("suspend2disk")){
pixmap = KGlobal::iconLoader()->loadIcon("suspend_to_disk", KIcon::NoGroup, KIcon::SizeLarge);
pixmap = TDEGlobal::iconLoader()->loadIcon("suspend_to_disk", KIcon::NoGroup, KIcon::SizeLarge);
} else if (type.startsWith("suspend2ram")) {
pixmap = KGlobal::iconLoader()->loadIcon("suspend_to_ram", KIcon::NoGroup, KIcon::SizeLarge);
pixmap = TDEGlobal::iconLoader()->loadIcon("suspend_to_ram", KIcon::NoGroup, KIcon::SizeLarge);
} else if (type.startsWith("standby")) {
pixmap = KGlobal::iconLoader()->loadIcon("stand_by", KIcon::NoGroup, KIcon::SizeLarge);
pixmap = TDEGlobal::iconLoader()->loadIcon("stand_by", KIcon::NoGroup, KIcon::SizeLarge);
} else {
pixmap = KGlobal::iconLoader()->loadIcon("kpowersave", KIcon::NoGroup, KIcon::SizeLarge);
pixmap = TDEGlobal::iconLoader()->loadIcon("kpowersave", KIcon::NoGroup, KIcon::SizeLarge);
}
iconPixmap->setPixmap( pixmap );
}

@ -53,7 +53,7 @@ HardwareInfo::HardwareInfo() {
sessionIsActive = true; // assume as first we are active
// initialize connection to the TDE hardware library
m_hwdevices = KGlobal::hardwareDevices();
m_hwdevices = TDEGlobal::hardwareDevices();
connect(m_hwdevices, TQT_SIGNAL(hardwareUpdated(TDEGenericDevice*)), this, TQT_SLOT(processHardwareChangedEvent(TDEGenericDevice*)));
connect(m_hwdevices, TQT_SIGNAL(eventDeviceKeyPressed(unsigned int, TDEEventDevice*)), this, TQT_SLOT(processKeyPressEvent(unsigned int, TDEEventDevice*)));

@ -64,7 +64,7 @@
Battery::Battery( TQString _udi ) {
if (trace) kdDebug() << funcinfo << "IN , udi: " << udi << endl;
m_hwdevices = KGlobal::hardwareDevices();
m_hwdevices = TDEGlobal::hardwareDevices();
udi = _udi;

@ -47,7 +47,7 @@ CPUInfo::CPUInfo() {
update_info_cpufreq_speed_changed = true;
numOfCPUs = -1;
m_hwdevices = KGlobal::hardwareDevices();
m_hwdevices = TDEGlobal::hardwareDevices();
kdDebugFuncOut(trace);
}

@ -285,15 +285,15 @@ void inactivity::checkBlacklisted(){
proc = NULL;
}
proc = new KProcess;
proc = new TDEProcess;
*proc << "pidof" << blacklist;
connect( proc, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)),this,
TQT_SLOT(getPIDs(KProcess *, char *, int)));
connect( proc, TQT_SIGNAL(processExited(KProcess *)),
TQT_SLOT(getPIDsExited(KProcess *)));
connect( proc, TQT_SIGNAL(receivedStdout(TDEProcess *, char *, int)),this,
TQT_SLOT(getPIDs(TDEProcess *, char *, int)));
connect( proc, TQT_SIGNAL(processExited(TDEProcess *)),
TQT_SLOT(getPIDsExited(TDEProcess *)));
if (!proc->start(KProcess::NotifyOnExit, KProcess::AllOutput))
if (!proc->start(TDEProcess::NotifyOnExit, TDEProcess::AllOutput))
{
emit displayErrorMsg(i18n("Could not start 'pidof'. "
"Could not autosuspend the machine.\n"
@ -311,11 +311,11 @@ void inactivity::checkBlacklisted(){
/*!
* \b TQT_SLOT to get the return of the command pidof and parse this to set
* \ref blacklisted_running .
* \param *proc pointer to the sending KProcess
* \param *proc pointer to the sending TDEProcess
* \param *buffer the char pointer to the output of the process to stdout
* \param *length the length of the buffer
*/
void inactivity::getPIDs(KProcess */*proc*/, char *buffer, int /*length*/) {
void inactivity::getPIDs(TDEProcess */*proc*/, char *buffer, int /*length*/) {
kdDebugFuncIn(trace);
TQString pids(buffer);
@ -345,7 +345,7 @@ void inactivity::getPIDs(KProcess */*proc*/, char *buffer, int /*length*/) {
* \b TQT_SLOT which called if the call of pidof is exited
* \param proc the KPocess which called this SLOT
*/
void inactivity::getPIDsExited(KProcess *proc){
void inactivity::getPIDsExited(TDEProcess *proc){
kdDebugFuncIn(trace);
pidof_call_returned = true;

@ -85,7 +85,7 @@ signals:
private:
//! pointer to the process to call pidof
KProcess *proc;
TDEProcess *proc;
//! about the call result of pidof
/*!
@ -163,9 +163,9 @@ private slots:
//! to monitor the values
void recheck();
//! to get the PIDs of blacklisted programs/processes
void getPIDs(KProcess *, char *, int);
void getPIDs(TDEProcess *, char *, int);
//! to get the signal if the command call is exited
void getPIDsExited(KProcess *);
void getPIDsExited(TDEProcess *);
};
#endif

@ -67,7 +67,7 @@ infoDialog::infoDialog( KConfig *config, TQString captionName, TQString message,
buttonOK->setIconSet(SmallIconSet("ok", TQIconSet::Automatic));
TQPixmap pixmap = 0;
pixmap = KGlobal::iconLoader()->loadIcon("messagebox_warning", KIcon::NoGroup, KIcon::SizeMedium);
pixmap = TDEGlobal::iconLoader()->loadIcon("messagebox_warning", KIcon::NoGroup, KIcon::SizeMedium);
iconPixmap->setPixmap( pixmap );
msgText->setText(message);

@ -67,7 +67,7 @@ kpowersave::kpowersave( bool force_acpi_check, bool trace_func ) : KSystemTray(0
resume_result = 0;
config = KGlobal::config();
config = TDEGlobal::config();
config->setGroup("General");
if(!config->readBoolEntry("AlreadyStarted", false) || force_acpi_check){
config->writeEntry("AlreadyStarted", true);
@ -504,7 +504,7 @@ void kpowersave::updateTooltip(){
/*!
* \b TQT_SLOT to starts the Yast2-power-management module. This called by the menuentry
* with ID \ref YAST_MODULE_MENU_ID, named "Start YaST2 Power Management Module".
* It create a new KProcess and execute "/sbin/yast2 power-management" with tdesu.
* It create a new TDEProcess and execute "/sbin/yast2 power-management" with tdesu.
*/
void kpowersave::do_config(){
kdDebugFuncIn(trace);
@ -512,12 +512,12 @@ void kpowersave::do_config(){
#ifdef ENABLE_YAST_ENTRY
delete yast2;
yast2 = new KProcess;
yast2 = new TDEProcess;
*yast2 << "tdesu" << "--nonewdcop" << "/sbin/yast2" << "power-management";
connect(yast2, TQT_SIGNAL(processExited(KProcess *)),
TQT_SLOT(slotConfigProcessExited(KProcess *)));
if(!yast2->start(KProcess::NotifyOnExit))
connect(yast2, TQT_SIGNAL(processExited(TDEProcess *)),
TQT_SLOT(slotConfigProcessExited(TDEProcess *)));
if(!yast2->start(TDEProcess::NotifyOnExit))
{
delete yast2;
yast2 = NULL;
@ -642,10 +642,10 @@ void kpowersave::observeConfigDlg(){
}
/*!
* \b TQT_SLOT which called from \ref do_config() if the 'tdesu yast2' KProcess exited.
* \b TQT_SLOT which called from \ref do_config() if the 'tdesu yast2' TDEProcess exited.
* This function control the return value and display if needed a errormessage on failure.
*/
void kpowersave::slotConfigProcessExited(KProcess *proc){
void kpowersave::slotConfigProcessExited(TDEProcess *proc){
kdDebugFuncIn(trace);
#ifdef ENABLE_YAST_ENTRY

@ -88,8 +88,8 @@ private:
autodimm * autoDimm;
// temporary pointer, use them if needed
//! KProcess to start YaST-module for configuration
KProcess *yast2;
//! TDEProcess to start YaST-module for configuration
TDEProcess *yast2;
//! instance of \ref ConfigureDialog
/*! the implemtation and all related functions for the configure dialog*/
ConfigureDialog *configDlg;
@ -330,7 +330,7 @@ private slots:
//! sets the CPU Freq policy via the TDE hardware library
void do_setSpeedPolicy( int );
//! called if there are problems with starting yast module
void slotConfigProcessExited( KProcess * );
void slotConfigProcessExited( TDEProcess * );
//! called to open the kpowersave help
void slotHelp();
//! called to open the kpowersave About dialog

@ -281,12 +281,12 @@ int screen::checkScreenSaverStatus() {
if (check == 10) {
delete gnomeScreensaverCheck;
gnomeScreensaverCheck = new KProcess;
gnomeScreensaverCheck = new TDEProcess;
*gnomeScreensaverCheck << "gnome-screensaver-command" << "--query";
connect( gnomeScreensaverCheck , TQT_SIGNAL(processExited(KProcess *)),TQT_SLOT(getGSExited(KProcess *)));
connect( gnomeScreensaverCheck , TQT_SIGNAL(processExited(TDEProcess *)),TQT_SLOT(getGSExited(TDEProcess *)));
if(!gnomeScreensaverCheck->start(KProcess::NotifyOnExit))
if(!gnomeScreensaverCheck->start(TDEProcess::NotifyOnExit))
{
delete gnomeScreensaverCheck;
gnomeScreensaverCheck = NULL;
@ -302,7 +302,7 @@ int screen::checkScreenSaverStatus() {
* \b TQT_SLOT which called if the call of gnomescreensaver-command exited
* \param gnomecheckcommand the KPocess which called this SLOT
*/
void screen::getGSExited (KProcess *gnomecheckcommand) {
void screen::getGSExited (TDEProcess *gnomecheckcommand) {
kdDebugFuncIn(trace);
if (gnomecheckcommand->normalExit()){
@ -449,12 +449,12 @@ bool screen::lockScreen(){
xscreensaver:
delete xscreensaver_lock;
xscreensaver_lock = new KProcess;
xscreensaver_lock = new TDEProcess;
*xscreensaver_lock << "xscreensaver-command" << "-lock";
connect(xscreensaver_lock, TQT_SIGNAL(processExited(KProcess*)),
this, TQT_SLOT(cleanProcess(KProcess*)));
connect(xscreensaver_lock, TQT_SIGNAL(processExited(TDEProcess*)),
this, TQT_SLOT(cleanProcess(TDEProcess*)));
bool status = xscreensaver_lock->start(KProcess::DontCare);
bool status = xscreensaver_lock->start(TDEProcess::DontCare);
if(!status)
{
delete xscreensaver_lock;
@ -466,12 +466,12 @@ xscreensaver:
else if(SCREENSAVER_STATUS == 20){
delete gnomescreensaver_lock;
gnomescreensaver_lock = new KProcess;
gnomescreensaver_lock = new TDEProcess;
*gnomescreensaver_lock << "gnome-screensaver-command" << "--lock";
connect(gnomescreensaver_lock, TQT_SIGNAL(processExited(KProcess*)),
this, TQT_SLOT(cleanProcess(KProcess*)));
bool status = gnomescreensaver_lock->start(KProcess::DontCare);
connect(gnomescreensaver_lock, TQT_SIGNAL(processExited(TDEProcess*)),
this, TQT_SLOT(cleanProcess(TDEProcess*)));
bool status = gnomescreensaver_lock->start(TDEProcess::DontCare);
if(!status)
{
delete gnomescreensaver_lock;
@ -485,11 +485,11 @@ xscreensaver:
else if(SCREENSAVER_STATUS == 10 || SCREENSAVER_STATUS == 99){
delete xlock;
xlock = new KProcess;
xlock = new TDEProcess;
*xlock << "xlock"; //<< "-mode" << "blank";
connect(xlock, TQT_SIGNAL(processExited(KProcess*)),
this, TQT_SLOT(cleanProcess(KProcess*)));
bool status = xlock->start(KProcess::DontCare);
connect(xlock, TQT_SIGNAL(processExited(TDEProcess*)),
this, TQT_SLOT(cleanProcess(TDEProcess*)));
bool status = xlock->start(TDEProcess::DontCare);
if(!status)
{
delete xlock;
@ -519,12 +519,12 @@ bool screen::lockScreen( TQString lock_withMethod ) {
else if (lock_withMethod == "xlock") {
delete xlock;
xlock = new KProcess;
xlock = new TDEProcess;
*xlock << "xlock";
connect(xlock, TQT_SIGNAL(processExited(KProcess*)),
this, TQT_SLOT(cleanProcess(KProcess*)));
connect(xlock, TQT_SIGNAL(processExited(TDEProcess*)),
this, TQT_SLOT(cleanProcess(TDEProcess*)));
bool status = xlock->start(KProcess::DontCare);
bool status = xlock->start(TDEProcess::DontCare);
if(!status)
{
delete xlock;
@ -534,12 +534,12 @@ bool screen::lockScreen( TQString lock_withMethod ) {
return status;
}
else if (lock_withMethod == "gnomescreensaver") {
gnomescreensaver_lock = new KProcess;
gnomescreensaver_lock = new TDEProcess;
*gnomescreensaver_lock << "gnome-screensaver-command" << "--lock";
connect(gnomescreensaver_lock, TQT_SIGNAL(processExited(KProcess*)),
this, TQT_SLOT(cleanProcess(KProcess*)));
connect(gnomescreensaver_lock, TQT_SIGNAL(processExited(TDEProcess*)),
this, TQT_SLOT(cleanProcess(TDEProcess*)));
bool status = gnomescreensaver_lock->start(KProcess::DontCare);
bool status = gnomescreensaver_lock->start(TDEProcess::DontCare);
if(!status)
{
delete gnomescreensaver_lock;
@ -569,12 +569,12 @@ bool screen::lockScreen( TQString lock_withMethod ) {
xscreensaver:
delete xscreensaver_lock;
xscreensaver_lock = new KProcess;
xscreensaver_lock = new TDEProcess;
*xscreensaver_lock << "xscreensaver-command" << "-lock";
connect(xscreensaver_lock, TQT_SIGNAL(processExited(KProcess*)),
this, TQT_SLOT(cleanProcess(KProcess*)));
connect(xscreensaver_lock, TQT_SIGNAL(processExited(TDEProcess*)),
this, TQT_SLOT(cleanProcess(TDEProcess*)));
bool status = xscreensaver_lock->start(KProcess::DontCare);
bool status = xscreensaver_lock->start(TDEProcess::DontCare);
if(!status)
{
delete xscreensaver_lock;
@ -652,12 +652,12 @@ bool screen::resetXScreensaver(){
delete xscreensaver_reset;
xscreensaver_reset = new KProcess;
xscreensaver_reset = new TDEProcess;
*xscreensaver_reset << "xscreensaver-command" << "-restart";
connect(xscreensaver_reset, TQT_SIGNAL(processExited(KProcess*)),
this, TQT_SLOT(cleanProcess(KProcess*)));
connect(xscreensaver_reset, TQT_SIGNAL(processExited(TDEProcess*)),
this, TQT_SLOT(cleanProcess(TDEProcess*)));
bool status = xscreensaver_reset->start(KProcess::DontCare);
bool status = xscreensaver_reset->start(TDEProcess::DontCare);
if(!status)
{
delete xscreensaver_reset;
@ -677,10 +677,10 @@ bool screen::resetXScreensaver(){
void screen::forceDPMSOff() {
kdDebugFuncIn(trace);
KProcess *xset = new KProcess;
TDEProcess *xset = new TDEProcess;
*xset << "xset" << "dpms" << "force" << "off";
connect(xset, TQT_SIGNAL(processExited(KProcess*)),
this, TQT_SLOT(cleanProcess(KProcess*)));
connect(xset, TQT_SIGNAL(processExited(TDEProcess*)),
this, TQT_SLOT(cleanProcess(TDEProcess*)));
if(!xset->start())
{
delete xset;
@ -690,9 +690,9 @@ void screen::forceDPMSOff() {
}
/*!
* function to clean KProcess objects
* function to clean TDEProcess objects
*/
void screen::cleanProcess(KProcess* proc)
void screen::cleanProcess(TDEProcess* proc)
{
delete proc;
proc = NULL;

@ -66,16 +66,16 @@ private:
* commandos to the active KScreensaver.
*/
DCOPRef screen_save_dcop_ref;
//! KProcess to start xlock to lock the screen
KProcess *xlock;
//! KProcess to start xscreensaver with lock command
KProcess *xscreensaver_lock;
//! KProcess to start xscreensaver with restart command
KProcess *xscreensaver_reset;
//! KProcess to start gnome-screen-saver with lock command
KProcess *gnomescreensaver_lock;
//! KProcess to check if gnome-screensaver is running
KProcess *gnomeScreensaverCheck;
//! TDEProcess to start xlock to lock the screen
TDEProcess *xlock;
//! TDEProcess to start xscreensaver with lock command
TDEProcess *xscreensaver_lock;
//! TDEProcess to start xscreensaver with restart command
TDEProcess *xscreensaver_reset;
//! TDEProcess to start gnome-screen-saver with lock command
TDEProcess *gnomescreensaver_lock;
//! TDEProcess to check if gnome-screensaver is running
TDEProcess *gnomeScreensaverCheck;
//! contains information about Xscreensaver
/*!
@ -120,9 +120,9 @@ private slots:
//! to ping and deactivate the Xscreensaver
void xscreensaver_ping();
//! to get the return value of gnomescreensaver-command
void getGSExited(KProcess *);
void getGSExited(TDEProcess *);
void cleanProcess(KProcess *);
void cleanProcess(TDEProcess *);
public slots:

@ -59,13 +59,13 @@ void suspendDialog::setPixmap( TQString type )
{
TQPixmap pixmap = 0;
if(type.startsWith("suspend2disk")){// || type.startsWith("NULL")) {
pixmap = KGlobal::iconLoader()->loadIcon("suspend_to_disk", KIcon::NoGroup, KIcon::SizeLarge);
pixmap = TDEGlobal::iconLoader()->loadIcon("suspend_to_disk", KIcon::NoGroup, KIcon::SizeLarge);
} else if (type.startsWith("suspend2ram")) {
pixmap = KGlobal::iconLoader()->loadIcon("suspend_to_ram", KIcon::NoGroup, KIcon::SizeLarge);
pixmap = TDEGlobal::iconLoader()->loadIcon("suspend_to_ram", KIcon::NoGroup, KIcon::SizeLarge);
} else if (type.startsWith("standby")) {
pixmap = KGlobal::iconLoader()->loadIcon("stand_by", KIcon::NoGroup, KIcon::SizeLarge);
pixmap = TDEGlobal::iconLoader()->loadIcon("stand_by", KIcon::NoGroup, KIcon::SizeLarge);
} else {
pixmap = KGlobal::iconLoader()->loadIcon("kpowersave", KIcon::NoGroup, KIcon::SizeLarge);
pixmap = TDEGlobal::iconLoader()->loadIcon("kpowersave", KIcon::NoGroup, KIcon::SizeLarge);
}
setCaption(i18n("Preparing Suspend..."));
iconPixmap->setPixmap( pixmap );

Loading…
Cancel
Save