Changed not-implemented on linux to warning log instead of assert crash

master
BlackMark 2020-07-06 18:35:06 +02:00
parent a79cb5182b
commit b6fb83417f
2 changed files with 19 additions and 8 deletions

View File

@ -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

View File

@ -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