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