UI: Add functions for executing funcs without blocking
Adds functions for executing functions within separate threads without blocking the user interface, or by blocking the user interface with a dialog box.
This commit is contained in:
@@ -67,6 +67,12 @@ QDataStream &operator>>(QDataStream &in, OBSSceneItem &si);
|
||||
|
||||
QThread *CreateQThread(std::function<void()> func);
|
||||
|
||||
void ExecuteFuncSafeBlock(std::function<void()> func);
|
||||
void ExecuteFuncSafeBlockMsgBox(
|
||||
std::function<void()> func,
|
||||
const QString &title,
|
||||
const QString &text);
|
||||
|
||||
class SignalBlocker {
|
||||
QWidget *widget;
|
||||
bool blocked;
|
||||
|
Reference in New Issue
Block a user