Skip to content

Commit

Permalink
Try to simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
victimsnino committed Nov 21, 2022
1 parent 8666da9 commit 37c5b05
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/rppqt/rppqt/schedulers/main_thread_scheduler.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#include <chrono>
#include <concepts>

#include <QApplication>
#include <QCoreApplication>
#include <QTimer>

namespace rppqt::schedulers
Expand Down Expand Up @@ -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!"};
Expand Down
2 changes: 1 addition & 1 deletion src/tests/rppqt/test_main_thread_scheduler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<std::thread::id> execution_thread{};
Expand Down

0 comments on commit 37c5b05

Please sign in to comment.