@@ -411,7 +411,8 @@ void SessionManager::RequestHibernate()
411
411
qWarning () << " failed to hibernate, error: " << reply.error ().name ();
412
412
}
413
413
414
- if (Utils::SettingValue (" com.deepin.dde.startdde" , QByteArray (), " quick-black-screen" , false ).toBool ()) {
414
+ // NOTE: do we need it anymore?
415
+ if (Dconf::SetValue (" com.deepin.dde.startdde" , " " , " quick-black-screen" , false )) {
415
416
setDPMSMode (false );
416
417
}
417
418
}
@@ -453,7 +454,7 @@ void SessionManager::RequestSuspend()
453
454
}
454
455
455
456
// 使用窗管接口进行黑屏处理
456
- if (Utils::SettingValue (" com.deepin.dde.startdde" , QByteArray () , " quick-black-screen" , false ). toBool ( )) {
457
+ if (Dconf::SetValue (" com.deepin.dde.startdde" , " " , " quick-black-screen" , QVariant ( false ))) {
457
458
QDBusInterface inter (" org.kde.KWin" , " /BlackScreen" , " org.kde.kwin.BlackScreen" , QDBusConnection::sessionBus (), this );
458
459
const QDBusMessage &msg = inter.call (" setActive" , true );
459
460
if (!msg.errorName ().isEmpty ())
@@ -814,7 +815,8 @@ void SessionManager::shutdown(bool force)
814
815
qWarning () << " failed to power off, error: " << reply.error ().name ();
815
816
}
816
817
817
- if (Utils::SettingValue (" com.deepin.dde.startdde" , QByteArray (), " quick-black-screen" , false ).toBool ()) {
818
+ // NOTE: do we need it anymore?
819
+ if (Dconf::SetValue (" com.deepin.dde.startdde" , " " , " quick-black-screen" , false )) {
818
820
setDPMSMode (false );
819
821
}
820
822
@@ -831,15 +833,11 @@ void SessionManager::reboot(bool force)
831
833
qWarning () << " failed to reboot, error: " << reply.error ().name ();
832
834
}
833
835
834
- if (Utils::SettingValue (" com.deepin.dde.startdde" , QByteArray (), " quick-black-screen" , false ).toBool ()) {
836
+ // NOTE: do we need it anymore?
837
+ if (Dconf::SetValue (" com.deepin.dde.startdde" , " " , " quick-black-screen" , QVariant (false ))) {
835
838
setDPMSMode (false );
836
839
}
837
840
838
- QDBusPendingReply<> reply2 = m_login1SessionInter->Terminate ();
839
- if (reply2.isError ()) {
840
- qWarning () << " self session failed to terminate, error: " << reply2.error ().name ();
841
- }
842
-
843
841
qApp->quit ();
844
842
}
845
843
0 commit comments