From b9170388b6d0e33b84d8f38c12fc364abba16e88 Mon Sep 17 00:00:00 2001 From: BlackMark Date: Sun, 5 Jul 2020 20:47:22 +0200 Subject: [PATCH] Improve logging --- AdaptiveBrightness/monitor_win.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/AdaptiveBrightness/monitor_win.cpp b/AdaptiveBrightness/monitor_win.cpp index e261270..d4b0daf 100644 --- a/AdaptiveBrightness/monitor_win.cpp +++ b/AdaptiveBrightness/monitor_win.cpp @@ -47,7 +47,7 @@ Monitor::operator bool() const bool Monitor::hasBrightnessCapability() const { - qDebug(ltr("Getting capabilities for monitor '%1' with handle '0x%2' and physical handle '0x%3'") + qDebug(ltr("Getting capabilities of monitor '%1' with handle '0x%2' and physical handle '0x%3'") .arg(m_physicalMonitor.name) .arg(reinterpret_cast(m_hMonitor), 0, 16) .arg(reinterpret_cast(m_physicalMonitor.handle), 0, 16)); @@ -56,7 +56,9 @@ bool Monitor::hasBrightnessCapability() const DWORD colorTemperatures = 0; if(!GetMonitorCapabilities(m_physicalMonitor.handle, &monitorCapabilities, &colorTemperatures)) { - qCritical(ltr("Failed to get capabilities for monitor '0x%1', error: %2") + qCritical(ltr("Failed to get capabilities of monitor '%1' with handle '0x%2' and physical handle '0x%3', error: %4") + .arg(m_physicalMonitor.name) + .arg(reinterpret_cast(m_hMonitor), 0, 16) .arg(reinterpret_cast(m_physicalMonitor.handle), 0, 16) .arg(getLastErrorString())); return false;