From 801fb7ebf0db1c57e8de463cefb124c464a3f7b2 Mon Sep 17 00:00:00 2001 From: lupoDharkael Date: Sun, 29 Apr 2018 12:55:16 +0200 Subject: [PATCH] Fix windows build --- src/core/capturerequest.h | 1 + src/core/controller.cpp | 4 +++- src/core/controller.h | 1 + src/core/globalshortcutfilter.cpp | 3 ++- 4 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/core/capturerequest.h b/src/core/capturerequest.h index 45ea4a20..39abdcfb 100644 --- a/src/core/capturerequest.h +++ b/src/core/capturerequest.h @@ -18,6 +18,7 @@ #pragma once #include +#include class CaptureRequest { public: diff --git a/src/core/controller.cpp b/src/core/controller.cpp index e84400b1..671686b6 100644 --- a/src/core/controller.cpp +++ b/src/core/controller.cpp @@ -50,7 +50,9 @@ Controller::Controller() : m_captureWindow(nullptr) { GlobalShortcutFilter *nativeFilter = new GlobalShortcutFilter(this); qApp->installNativeEventFilter(nativeFilter); connect(nativeFilter, &GlobalShortcutFilter::printPressed, - this, [this](){ this->createVisualCapture(); }); + this, [this](){ + this->requestCapture(CaptureRequest(CaptureRequest::GRAPHICAL_MODE)); + }); #endif QString StyleSheet = CaptureButton::globalStyleSheet(); diff --git a/src/core/controller.h b/src/core/controller.h index 043a2954..b58d9b1d 100644 --- a/src/core/controller.h +++ b/src/core/controller.h @@ -21,6 +21,7 @@ #include #include #include +#include #include #include diff --git a/src/core/globalshortcutfilter.cpp b/src/core/globalshortcutfilter.cpp index 534f9683..58d83c88 100644 --- a/src/core/globalshortcutfilter.cpp +++ b/src/core/globalshortcutfilter.cpp @@ -43,7 +43,8 @@ bool GlobalShortcutFilter::nativeEventFilter( // TODO: this is just a temporal workwrround, proper global // support would need custom shortcuts defined by the user. - Controller::getInstance()->startVisualCapture(); + Controller::getInstance()->requestCapture( + CaptureRequest(CaptureRequest::GRAPHICAL_MODE)); return true; } return false;