Fix unintended rename of SAKProcess*

pull/2/head
Slávek Banko 11 years ago
parent 34dfb0d712
commit 0dd840ea93

@ -1833,11 +1833,11 @@ bool LockProcess::checkPass()
if (trinity_desktop_lock_use_sak) { if (trinity_desktop_lock_use_sak) {
// Verify SAK operational status // Verify SAK operational status
TDEProcess* checkSATDEProcess = new TDEProcess; TDEProcess* checkSAKProcess = new TDEProcess;
*checkSATDEProcess << "tdmtsak" << "check"; *checkSAKProcess << "tdmtsak" << "check";
checkSATDEProcess->start(TDEProcess::Block, TDEProcess::NoCommunication); checkSAKProcess->start(TDEProcess::Block, TDEProcess::NoCommunication);
int retcode = checkSATDEProcess->exitStatus(); int retcode = checkSAKProcess->exitStatus();
delete checkSATDEProcess; delete checkSAKProcess;
if (retcode != 0) { if (retcode != 0) {
trinity_desktop_lock_use_sak = false; trinity_desktop_lock_use_sak = false;
} }

@ -104,24 +104,24 @@ SAKDlg::SAKDlg(LockProcess *parent)
installEventFilter(this); installEventFilter(this);
setFixedSize( sizeHint() ); setFixedSize( sizeHint() );
mSATDEProcess = new TDEProcess; mSAKProcess = new TDEProcess;
*mSATDEProcess << "tdmtsak"; *mSAKProcess << "tdmtsak";
connect(mSATDEProcess, TQT_SIGNAL(processExited(TDEProcess*)), this, TQT_SLOT(slotSATDEProcessExited())); connect(mSAKProcess, TQT_SIGNAL(processExited(TDEProcess*)), this, TQT_SLOT(slotSAKProcessExited()));
mSATDEProcess->start(); mSAKProcess->start();
} }
void SAKDlg::slotSATDEProcessExited() void SAKDlg::slotSAKProcessExited()
{ {
int retcode = mSATDEProcess->exitStatus(); int retcode = mSAKProcess->exitStatus();
if (retcode != 0) trinity_desktop_lock_use_sak = false; if (retcode != 0) trinity_desktop_lock_use_sak = false;
hide(); hide();
} }
SAKDlg::~SAKDlg() SAKDlg::~SAKDlg()
{ {
if ((mSATDEProcess) && (mSATDEProcess->isRunning())) { if ((mSAKProcess) && (mSAKProcess->isRunning())) {
mSATDEProcess->kill(SIGTERM); mSAKProcess->kill(SIGTERM);
delete mSATDEProcess; delete mSAKProcess;
} }
hide(); hide();
} }

@ -37,7 +37,7 @@ public:
void closeDialogForced(); void closeDialogForced();
private slots: private slots:
void slotSATDEProcessExited(); void slotSAKProcessExited();
protected slots: protected slots:
virtual void reject(); virtual void reject();
@ -51,7 +51,7 @@ private:
TQStringList layoutsList; TQStringList layoutsList;
TQStringList::iterator currLayout; TQStringList::iterator currLayout;
int sPid, sFd; int sPid, sFd;
TDEProcess* mSATDEProcess; TDEProcess* mSAKProcess;
}; };
#endif #endif

@ -54,7 +54,7 @@ SaverEngine::SaverEngine()
: TQWidget(), : TQWidget(),
KScreensaverIface(), KScreensaverIface(),
mBlankOnly(false), mBlankOnly(false),
mSATDEProcess(NULL), mSAKProcess(NULL),
mTerminationRequested(false) mTerminationRequested(false)
{ {
struct sigaction act; struct sigaction act;
@ -86,9 +86,9 @@ SaverEngine::SaverEngine()
connect(&mLockProcess, TQT_SIGNAL(processExited(TDEProcess *)), connect(&mLockProcess, TQT_SIGNAL(processExited(TDEProcess *)),
TQT_SLOT(lockProcessExited())); TQT_SLOT(lockProcessExited()));
mSATDEProcess = new TDEProcess; mSAKProcess = new TDEProcess;
*mSATDEProcess << "tdmtsak"; *mSAKProcess << "tdmtsak";
connect(mSATDEProcess, TQT_SIGNAL(processExited(TDEProcess*)), this, TQT_SLOT(slotSATDEProcessExited())); connect(mSAKProcess, TQT_SIGNAL(processExited(TDEProcess*)), this, TQT_SLOT(slotSAKProcessExited()));
TQTimer::singleShot( 0, this, TQT_SLOT(handleSecureDialog()) ); TQTimer::singleShot( 0, this, TQT_SLOT(handleSecureDialog()) );
@ -134,7 +134,7 @@ void SaverEngine::lock()
bool ok = true; bool ok = true;
if (mState != Saving) if (mState != Saving)
{ {
mSATDEProcess->kill(SIGTERM); mSAKProcess->kill(SIGTERM);
ok = startLockProcess( ForceLock ); ok = startLockProcess( ForceLock );
// It takes a while for kdesktop_lock to start and lock the screen. // It takes a while for kdesktop_lock to start and lock the screen.
// Therefore delay the DCOP call until it tells kdesktop that the locking is in effect. // Therefore delay the DCOP call until it tells kdesktop that the locking is in effect.
@ -179,7 +179,7 @@ void SaverEngine::save()
{ {
if (mState == Waiting) if (mState == Waiting)
{ {
mSATDEProcess->kill(SIGTERM); mSAKProcess->kill(SIGTERM);
startLockProcess( DefaultLock ); startLockProcess( DefaultLock );
} }
} }
@ -276,18 +276,18 @@ void SaverEngine::enableExports()
void SaverEngine::handleSecureDialog() void SaverEngine::handleSecureDialog()
{ {
// Wait for SAK press // Wait for SAK press
if (!mSATDEProcess->isRunning()) mSATDEProcess->start(); if (!mSAKProcess->isRunning()) mSAKProcess->start();
} }
void SaverEngine::slotSATDEProcessExited() void SaverEngine::slotSAKProcessExited()
{ {
int retcode = mSATDEProcess->exitStatus(); int retcode = mSAKProcess->exitStatus();
if ((retcode != 0) && (mSATDEProcess->normalExit())) { if ((retcode != 0) && (mSAKProcess->normalExit())) {
trinity_lockeng_sak_available = FALSE; trinity_lockeng_sak_available = FALSE;
printf("[kdesktop] SAK driven secure dialog is not available for use (retcode %d). Check tdmtsak for proper functionality.\n", retcode); fflush(stdout); printf("[kdesktop] SAK driven secure dialog is not available for use (retcode %d). Check tdmtsak for proper functionality.\n", retcode); fflush(stdout);
} }
if ((mSATDEProcess->normalExit()) && (trinity_lockeng_sak_available == TRUE)) { if ((mSAKProcess->normalExit()) && (trinity_lockeng_sak_available == TRUE)) {
bool ok = true; bool ok = true;
if (mState == Waiting) if (mState == Waiting)
{ {
@ -525,7 +525,7 @@ void SaverEngine::idleTimeout()
// disable X screensaver // disable X screensaver
XForceScreenSaver(tqt_xdisplay(), ScreenSaverReset ); XForceScreenSaver(tqt_xdisplay(), ScreenSaverReset );
XSetScreenSaver(tqt_xdisplay(), 0, mXInterval, PreferBlanking, DontAllowExposures); XSetScreenSaver(tqt_xdisplay(), 0, mXInterval, PreferBlanking, DontAllowExposures);
mSATDEProcess->kill(SIGTERM); mSAKProcess->kill(SIGTERM);
startLockProcess( DefaultLock ); startLockProcess( DefaultLock );
} }

@ -89,7 +89,7 @@ protected slots:
private slots: private slots:
void handleSecureDialog(); void handleSecureDialog();
void slotSATDEProcessExited(); void slotSAKProcessExited();
/** /**
* Enable wallpaper exports * Enable wallpaper exports
@ -123,7 +123,7 @@ protected:
TQValueVector< DCOPClientTransaction* > mLockTransactions; TQValueVector< DCOPClientTransaction* > mLockTransactions;
private: private:
TDEProcess* mSATDEProcess; TDEProcess* mSAKProcess;
bool mTerminationRequested; bool mTerminationRequested;
}; };

@ -125,17 +125,17 @@ SAKDlg::SAKDlg(TQWidget *parent)
installEventFilter(this); installEventFilter(this);
mSATDEProcess = new TDEProcess; mSAKProcess = new TDEProcess;
*mSATDEProcess << "tdmtsak" << "dm"; *mSAKProcess << "tdmtsak" << "dm";
connect(mSATDEProcess, TQT_SIGNAL(processExited(TDEProcess*)), this, TQT_SLOT(slotSATDEProcessExited())); connect(mSAKProcess, TQT_SIGNAL(processExited(TDEProcess*)), this, TQT_SLOT(slotSAKProcessExited()));
mSATDEProcess->start(); mSAKProcess->start();
TQTimer::singleShot( 0, this, TQT_SLOT(handleInputPipe()) ); TQTimer::singleShot( 0, this, TQT_SLOT(handleInputPipe()) );
} }
void SAKDlg::slotSATDEProcessExited() void SAKDlg::slotSAKProcessExited()
{ {
int retcode = mSATDEProcess->exitStatus(); int retcode = mSAKProcess->exitStatus();
if (retcode != 0) trinity_desktop_lock_use_sak = false; if (retcode != 0) trinity_desktop_lock_use_sak = false;
closingDown = true; closingDown = true;
hide(); hide();
@ -207,7 +207,7 @@ void SAKDlg::handleInputPipe(void) {
inputcommand = inputcommand.replace('\n', ""); inputcommand = inputcommand.replace('\n', "");
TQStringList commandList = TQStringList::split('\t', inputcommand, false); TQStringList commandList = TQStringList::split('\t', inputcommand, false);
if ((*(commandList.at(0))) == "CLOSE") { if ((*(commandList.at(0))) == "CLOSE") {
mSATDEProcess->kill(); mSAKProcess->kill();
} }
if (!closingDown) { if (!closingDown) {
TQTimer::singleShot( 0, this, TQT_SLOT(handleInputPipe()) ); TQTimer::singleShot( 0, this, TQT_SLOT(handleInputPipe()) );
@ -221,9 +221,9 @@ void SAKDlg::handleInputPipe(void) {
SAKDlg::~SAKDlg() SAKDlg::~SAKDlg()
{ {
if ((mSATDEProcess) && (mSATDEProcess->isRunning())) { if ((mSAKProcess) && (mSAKProcess->isRunning())) {
mSATDEProcess->kill(SIGTERM); mSAKProcess->kill(SIGTERM);
delete mSATDEProcess; delete mSAKProcess;
} }
if (mPipe_fd != -1) { if (mPipe_fd != -1) {
closingDown = true; closingDown = true;

@ -37,7 +37,7 @@ public:
void closeDialogForced(); void closeDialogForced();
private slots: private slots:
void slotSATDEProcessExited(); void slotSAKProcessExited();
void handleInputPipe(); void handleInputPipe();
protected slots: protected slots:
@ -52,7 +52,7 @@ private:
TQStringList layoutsList; TQStringList layoutsList;
TQStringList::iterator currLayout; TQStringList::iterator currLayout;
int sPid, sFd; int sPid, sFd;
TDEProcess* mSATDEProcess; TDEProcess* mSAKProcess;
int mPipe_fd; int mPipe_fd;
TQString mPipeFilename; TQString mPipeFilename;

Loading…
Cancel
Save