From 37c5b0574a9d6aa89cf1339e35c4cae27b2881a2 Mon Sep 17 00:00:00 2001 From: Aleksey Loginov Date: Mon, 21 Nov 2022 22:39:53 +0300 Subject: [PATCH] Try to simplify --- src/rppqt/rppqt/schedulers/main_thread_scheduler.hpp | 4 ++-- src/tests/rppqt/test_main_thread_scheduler.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/rppqt/rppqt/schedulers/main_thread_scheduler.hpp b/src/rppqt/rppqt/schedulers/main_thread_scheduler.hpp index f3280b038..103ab6bbf 100644 --- a/src/rppqt/rppqt/schedulers/main_thread_scheduler.hpp +++ b/src/rppqt/rppqt/schedulers/main_thread_scheduler.hpp @@ -18,7 +18,7 @@ #include #include -#include +#include #include namespace rppqt::schedulers @@ -51,7 +51,7 @@ class main_thread_scheduler final : public rpp::schedulers::details::scheduler_t if (!m_sub.is_subscribed()) return; - const auto application = QApplication::instance(); + const auto application = QCoreApplication::instance(); if (!application) throw utils::no_active_qapplication{ "Pointer to application is null. Create QApplication before using main_thread_scheduler!"}; diff --git a/src/tests/rppqt/test_main_thread_scheduler.cpp b/src/tests/rppqt/test_main_thread_scheduler.cpp index a2d98bb1e..ff18d3987 100644 --- a/src/tests/rppqt/test_main_thread_scheduler.cpp +++ b/src/tests/rppqt/test_main_thread_scheduler.cpp @@ -20,7 +20,7 @@ SCENARIO("main_thread_scheduler schedules actions to main thread", "[schedulers] GIVEN("qapplication and scheduler") { int argc{}; - QApplication application{argc, nullptr}; + QCoreApplication application{argc, nullptr}; WHEN("submitting action to main scheduler from another thread") { std::promise execution_thread{};