Implement abstract logger (#2174)

* AbstractLogger base implementation

Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>

* Switch most system notifications to AbstractLogger

Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>

* Make CLI parser use AbstractLogger

Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>

* Fix annoying QPainter warning in QtColorWidgets

Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>

* Remove obsolete TODOs

Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>

* Fix failing windows build

Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>

* Add missing #include <cassert>

Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>
This commit is contained in:
Haris Gušić
2021-12-21 18:59:08 +01:00
committed by GitHub
parent 8aa1dbf701
commit 36b3bd9639
14 changed files with 259 additions and 62 deletions

View File

@@ -10,6 +10,7 @@
// <http://www.gnu.org/licenses/old-licenses/library.txt>
#include "capturewidget.h"
#include "abstractlogger.h"
#include "copytool.h"
#include "src/core/controller.h"
#include "src/core/qguiappcurrentscreen.h"
@@ -100,7 +101,7 @@ CaptureWidget::CaptureWidget(const CaptureRequest& req,
bool ok = true;
m_context.screenshot = ScreenGrabber().grabEntireDesktop(ok);
if (!ok) {
SystemNotification().sendMessage(tr("Unable to capture screen"));
AbstractLogger::error() << tr("Unable to capture screen");
this->close();
}
m_context.origScreenshot = m_context.screenshot;