Zrythm v2.0.0-DEV
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
zrythm::test_helpers::ScopedQCoreApplication Class Reference

A base class that starts a QCoreApplication. More...

#include <tests/helpers/scoped_qcoreapplication.h>

Inheritance diagram for zrythm::test_helpers::ScopedQCoreApplication:

Static Public Member Functions

static void process_events_until_true (const std::function< bool()> &cond, unsigned int max_calls=100)
 Processes QCoreApplication events until cond returns true.
static void process_events_until_timeout (std::chrono::milliseconds time=std::chrono::milliseconds(200))

Detailed Description

A base class that starts a QCoreApplication.

This is needed in order to test signal functionality.

See also
https://forum.qt.io/post/804638

Definition at line 23 of file scoped_qcoreapplication.h.

Constructor & Destructor Documentation

◆ ScopedQCoreApplication()

zrythm::test_helpers::ScopedQCoreApplication::ScopedQCoreApplication ( )
inline

Definition at line 26 of file scoped_qcoreapplication.h.

Member Function Documentation

◆ process_events_until_timeout()

void zrythm::test_helpers::ScopedQCoreApplication::process_events_until_timeout ( std::chrono::milliseconds time = std::chrono::milliseconds (200))
inlinestatic

Definition at line 52 of file scoped_qcoreapplication.h.

◆ process_events_until_true()

void zrythm::test_helpers::ScopedQCoreApplication::process_events_until_true ( const std::function< bool()> & cond,
unsigned int max_calls = 100 )
inlinestatic

Processes QCoreApplication events until cond returns true.

Causes an assertion failure on timeout.

Definition at line 38 of file scoped_qcoreapplication.h.


The documentation for this class was generated from the following file: