Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions hiro/core/application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,6 @@ auto Application::run() -> void {
return pApplication::run();
}

auto Application::pendingEvents() -> bool {
return pApplication::pendingEvents();
}

auto Application::processEvents() -> void {
return pApplication::processEvents();
}
Expand Down
1 change: 0 additions & 1 deletion hiro/core/application.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ struct Application {
static auto run() -> void;
static auto scale() -> float;
static auto scale(float value) -> float;
static auto pendingEvents() -> bool;
static auto processEvents() -> void;
static auto quit() -> void;
static auto screenSaver() -> bool;
Expand Down
11 changes: 6 additions & 5 deletions hiro/qt/application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,13 @@ auto pApplication::run() -> void {
}
}

auto pApplication::pendingEvents() -> bool {
return QApplication::hasPendingEvents();
}

auto pApplication::processEvents() -> void {
while(pendingEvents()) QApplication::processEvents();
//qt6 has no means to spin the event loop indefinitely anymore
//this is likely to prevent bugs where events produced during the loop spin forever
//lets match hiro gtk and spin for a max of 50ms
//note that this overload of processEvents *will* spin, but it does exit if the queue is empty
//so it basically gives us the behavior from before, but with a 50ms cap, which is probably good
QApplication::processEvents(QEventLoop::AllEvents, 50);
}

auto pApplication::quit() -> void {
Expand Down
1 change: 0 additions & 1 deletion hiro/qt/application.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ struct pApplication {
static auto exit() -> void;
static auto modal() -> bool;
static auto run() -> void;
static auto pendingEvents() -> bool;
static auto processEvents() -> void;
static auto quit() -> void;
static auto setScreenSaver(bool screenSaver) -> void;
Expand Down
Loading