From e4f18911f9045e58840c66c7bcfb5fd292fa6e74 Mon Sep 17 00:00:00 2001 From: BlackMark Date: Fri, 17 Jul 2020 14:53:30 +0200 Subject: [PATCH] Add placeholder for linux version of monitor getName --- AdaptiveBrightness/monitor.hpp | 4 ++++ AdaptiveBrightness/monitor_linux.cpp | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/AdaptiveBrightness/monitor.hpp b/AdaptiveBrightness/monitor.hpp index f3faebb..206a496 100644 --- a/AdaptiveBrightness/monitor.hpp +++ b/AdaptiveBrightness/monitor.hpp @@ -57,6 +57,8 @@ class Monitor { #if defined(__clang__) || defined(__GNUC__) + #include + class Monitor { public: Monitor(); @@ -64,6 +66,8 @@ class Monitor { bool setBrightness(float); float getBrightness(); + QString getName() const; + operator bool() const; private: diff --git a/AdaptiveBrightness/monitor_linux.cpp b/AdaptiveBrightness/monitor_linux.cpp index 342a60c..350d477 100644 --- a/AdaptiveBrightness/monitor_linux.cpp +++ b/AdaptiveBrightness/monitor_linux.cpp @@ -26,6 +26,12 @@ float Monitor::getBrightness() return NAN; } +QString Monitor::getName() const +{ + qWarning(ltr("Getting monitor name not implemented")); + return "Unknown"; +} + Monitor::operator bool() const { qWarning(ltr("Checking monitor validity not implemented"));