Disable quiet hours check in Windows before 10.

We had several reports about wrong values in registry on Windows 8.1,
like the quiet hours are enabled and all notifications are skipped,
without anything like that being enabled in Windows settings.
This commit is contained in:
John Preston 2017-05-26 17:40:46 +03:00
parent 9e3f13ba2e
commit 57f0158ade
1 changed files with 6 additions and 2 deletions

View File

@ -597,9 +597,13 @@ namespace {
bool QuietHoursEnabled = false;
DWORD QuietHoursValue = 0;
// Thanks https://stackoverflow.com/questions/35600128/get-windows-quiet-hours-from-win32-or-c-sharp-api
void queryQuietHours() {
if (QSysInfo::windowsVersion() < QSysInfo::WV_WINDOWS8_1) {
// No system quiet hours in Windows prior to Windows 8.1
if (QSysInfo::windowsVersion() < QSysInfo::WV_WINDOWS10) {
// There are quiet hours in Windows starting from Windows 8.1
// But there were several reports about the notifications being shut
// down according to the registry while no quiet hours were enabled.
// So we try this method only starting with Windows 10.
return;
}