Changed not-implemented on linux to warning log instead of assert crash
This commit is contained in:
parent
a79cb5182b
commit
b6fb83417f
@ -2,12 +2,15 @@
|
|||||||
|
|
||||||
#if defined(__clang__) || defined(__GNUC__)
|
#if defined(__clang__) || defined(__GNUC__)
|
||||||
|
|
||||||
#include <cassert>
|
#include <QtDebug>
|
||||||
|
#include <QtGlobal>
|
||||||
|
|
||||||
|
#include "log_tr.hpp"
|
||||||
|
|
||||||
std::vector<Monitor> enumerateMonitors()
|
std::vector<Monitor> enumerateMonitors()
|
||||||
{
|
{
|
||||||
assert(!"Not implemented");
|
qWarning(ltr("Enumerating monitors not implemented"));
|
||||||
return {};
|
return {Monitor()};
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@ -2,26 +2,34 @@
|
|||||||
|
|
||||||
#if defined(__clang__) || defined(__GNUC__)
|
#if defined(__clang__) || defined(__GNUC__)
|
||||||
|
|
||||||
#include <cassert>
|
#include <cmath>
|
||||||
|
|
||||||
|
#include <QtDebug>
|
||||||
|
#include <QtGlobal>
|
||||||
|
|
||||||
|
#include "log_tr.hpp"
|
||||||
|
|
||||||
Monitor::Monitor()
|
Monitor::Monitor()
|
||||||
{
|
{
|
||||||
assert(!"Not implemented");
|
qWarning(ltr("Creating monitor not implemented"));
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Monitor::setBrightness(float)
|
bool Monitor::setBrightness(float)
|
||||||
{
|
{
|
||||||
assert(!"Not implemented");
|
qWarning(ltr("Setting monitor brightness not implemented"));
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
float Monitor::getBrightness()
|
float Monitor::getBrightness()
|
||||||
{
|
{
|
||||||
assert(!"Not implemented");
|
qWarning(ltr("Getting monitor brightness not implemented"));
|
||||||
|
return NAN;
|
||||||
}
|
}
|
||||||
|
|
||||||
Monitor::operator bool() const
|
Monitor::operator bool() const
|
||||||
{
|
{
|
||||||
assert(!"Not implemented");
|
qWarning(ltr("Checking monitor validity not implemented"));
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user