File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
SerialPrograms/Source/CommonFramework/Windows Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -97,6 +97,18 @@ MainWindow::MainWindow(QWidget* parent)
9797 m_sleep_box = new QCheckBox (" Force On" , support_box);
9898 layout->addWidget (m_sleep_box, 1 , Qt::AlignHCenter);
9999 sleep_suppress_state_changed (SystemSleepController::instance ().current_state ());
100+ #if QT_VERSION < 0x060700
101+ connect (
102+ m_sleep_box, &QCheckBox::stateChanged,
103+ this , [this ](int ){
104+ if (m_sleep_box->isChecked ()){
105+ m_sleep_scope.reset (new SleepSuppressScope (SleepSuppress::SCREEN_ON));
106+ }else {
107+ m_sleep_scope.reset ();
108+ }
109+ }
110+ );
111+ #else
100112 connect (
101113 m_sleep_box, &QCheckBox::checkStateChanged,
102114 this , [this ](Qt::CheckState state){
@@ -107,6 +119,7 @@ MainWindow::MainWindow(QWidget* parent)
107119 }
108120 }
109121 );
122+ #endif
110123 }
111124
112125 QHBoxLayout* support = new QHBoxLayout ();
You can’t perform that action at this time.
0 commit comments