Adding upstream version 0.9.0+20151026.

upstream/0.9.0+20151026
Alf Gaida 9 years ago
parent 08cd13d7e0
commit ef24b619f7

@ -50,8 +50,7 @@ namespace
ItemMoveAnimation(QLayoutItem *item)
: mItem(item)
{
setEasingCurve(QEasingCurve::OutBack);
setDuration(250);
setDuration(150);
}
void updateCurrentValue(const QVariant &current)

@ -34,10 +34,8 @@
using namespace LXQt;
Power::Power(QObject *parent) :
QObject(parent),
mScreenSaver(this)
QObject(parent)
{
connect(&mScreenSaver, SIGNAL(done()), &mLoop, SLOT(quit()));
mProviders.append(new CustomProvider(this));
mProviders.append(new SystemdProvider(this));
mProviders.append(new UPowerProvider(this));
@ -68,18 +66,11 @@ bool Power::doAction(Power::Action action)
{
foreach(PowerProvider* provider, mProviders)
{
if (provider->canAction(action))
if (provider->canAction(action) &&
provider->doAction(action)
)
{
if (action == PowerSuspend || action == PowerHibernate)
{
mScreenSaver.lockScreen();
mLoop.exec();
}
if (provider->doAction(action))
{
return true;
}
return false;
return true;
}
}
return false;

@ -31,8 +31,6 @@
#include <QObject>
#include <QList>
#include <QEventLoop>
#include "lxqtscreensaver.h"
#include "lxqtglobals.h"
namespace LXQt
@ -103,8 +101,6 @@ public slots:
private:
QList<PowerProvider*> mProviders;
LXQt::ScreenSaver mScreenSaver;
QEventLoop mLoop;
};
} // namespace LXQt

Loading…
Cancel
Save