suppressing sleep only works as long as we're not root. that's hardly helpful.
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1128987
This commit is contained in:
parent
a59062f073
commit
2d39afad2b
|
@ -29,11 +29,6 @@
|
||||||
|
|
||||||
#include <kdebug.h>
|
#include <kdebug.h>
|
||||||
#include <klocale.h>
|
#include <klocale.h>
|
||||||
#include <kglobal.h>
|
|
||||||
#include <kcomponentdata.h>
|
|
||||||
#include <kaboutdata.h>
|
|
||||||
|
|
||||||
#include <solid/powermanagement.h>
|
|
||||||
|
|
||||||
/** Constructs an OperationRunner.
|
/** Constructs an OperationRunner.
|
||||||
@param ostack the OperationStack to act on
|
@param ostack the OperationStack to act on
|
||||||
|
@ -56,9 +51,6 @@ void OperationRunner::run()
|
||||||
|
|
||||||
bool status = true;
|
bool status = true;
|
||||||
|
|
||||||
int suppressCookie = Solid::PowerManagement::beginSuppressingSleep(i18nc("@info Reason why sleep mode is suppressed", "<application>%1</application> is performing operations.", KGlobal::mainComponent().aboutData()->programName()));
|
|
||||||
kDebug() << suppressCookie;
|
|
||||||
|
|
||||||
for (int i = 0; i < numOperations(); i++)
|
for (int i = 0; i < numOperations(); i++)
|
||||||
{
|
{
|
||||||
suspendMutex().lock();
|
suspendMutex().lock();
|
||||||
|
@ -91,9 +83,6 @@ void OperationRunner::run()
|
||||||
msleep(5);
|
msleep(5);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (suppressCookie != -1)
|
|
||||||
Solid::PowerManagement::stopSuppressingSleep(suppressCookie);
|
|
||||||
|
|
||||||
if (!status)
|
if (!status)
|
||||||
emit error();
|
emit error();
|
||||||
else if (isCancelling())
|
else if (isCancelling())
|
||||||
|
|
Loading…
Reference in New Issue