wok rev 17258

liblxqt: patch
author Xander Ziiryanoff <psychomaniak@xakep.ru>
date Tue Oct 21 22:24:48 2014 +0200 (2014-10-21)
parents e9c56b27df13
children 5d1b0ab9a299
files liblxqt/receipt liblxqt/stuff/poweroff+reboot.diff
line diff
     1.1 --- a/liblxqt/receipt	Tue Oct 21 16:31:29 2014 +0300
     1.2 +++ b/liblxqt/receipt	Tue Oct 21 22:24:48 2014 +0200
     1.3 @@ -18,6 +18,7 @@
     1.4  # Rules to configure and make the package.
     1.5  compile_rules()
     1.6  {
     1.7 +	patch -p0 < $stuff/poweroff+reboot.diff
     1.8  	mkdir build; cd build
     1.9  	cmake -DCMAKE_INSTALL_PREFIX=/usr -DLXQT_ETC_XDG_DIR=/etc .. &&
    1.10  	make &&
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/liblxqt/stuff/poweroff+reboot.diff	Tue Oct 21 22:24:48 2014 +0200
     2.3 @@ -0,0 +1,37 @@
     2.4 +--- lxqtpower/lxqtpowerproviders.cpp
     2.5 ++++ lxqtpower/lxqtpowerproviders.cpp
     2.6 +@@ -497,2 +497,10 @@
     2.7 +                             PowerProvider::DontCheckDBUS);
     2.8 ++        case Power::PowerReboot:
     2.9 ++            return dbusCall(LXQT_SERVICE, LXQT_PATH, LXQT_SERVICE,
    2.10 ++                            QDBusConnection::sessionBus(), "canReboot",
    2.11 ++                            PowerProvider::DontCheckDBUS);
    2.12 ++        case Power::PowerShutdown:
    2.13 ++            return dbusCall(LXQT_SERVICE, LXQT_PATH, LXQT_SERVICE,
    2.14 ++                            QDBusConnection::sessionBus(), "canPoweroff",
    2.15 ++                            PowerProvider::DontCheckDBUS);
    2.16 +         default:
    2.17 +@@ -511,8 +519,2 @@
    2.18 +         command = "logout";
    2.19 +-        break;
    2.20 +-
    2.21 +-    default:
    2.22 +-        return false;
    2.23 +-    }
    2.24 +-
    2.25 +     return dbusCall(LXQT_SERVICE,
    2.26 +@@ -523,2 +525,14 @@
    2.27 +             );
    2.28 ++        break;
    2.29 ++    case Power::PowerReboot:
    2.30 ++        return QProcess::startDetached("reboot || reboot -f");
    2.31 ++        break;
    2.32 ++    case Power::PowerShutdown:
    2.33 ++        return QProcess::startDetached("poweroff");
    2.34 ++        break;
    2.35 ++
    2.36 ++    default:
    2.37 ++        return false;
    2.38 ++    }
    2.39 ++
    2.40 + }