mirror of
https://github.com/JulianGro/overte.git
synced 2025-08-09 01:06:55 +02:00
Add Window.raise() as replacement for Window.raiseMainWindow()
This commit is contained in:
parent
11f5e7812b
commit
d1d58eceab
2 changed files with 12 additions and 1 deletions
|
@ -78,13 +78,17 @@ void WindowScriptingInterface::setFocus() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
void WindowScriptingInterface::raiseMainWindow() {
|
void WindowScriptingInterface::raise() {
|
||||||
// It's forbidden to call raise() from another thread.
|
// It's forbidden to call raise() from another thread.
|
||||||
qApp->postLambdaEvent([] {
|
qApp->postLambdaEvent([] {
|
||||||
qApp->raise();
|
qApp->raise();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void WindowScriptingInterface::raiseMainWindow() {
|
||||||
|
raise();
|
||||||
|
}
|
||||||
|
|
||||||
/// Display an alert box
|
/// Display an alert box
|
||||||
/// \param const QString& message message to display
|
/// \param const QString& message message to display
|
||||||
/// \return QScriptValue::UndefinedValue
|
/// \return QScriptValue::UndefinedValue
|
||||||
|
|
|
@ -68,9 +68,16 @@ public slots:
|
||||||
*/
|
*/
|
||||||
void setFocus();
|
void setFocus();
|
||||||
|
|
||||||
|
/**jsdoc
|
||||||
|
* Raise the Interface window if it is minimized. If raised, the window gains focus.
|
||||||
|
* @function Window.raise
|
||||||
|
*/
|
||||||
|
void raise();
|
||||||
|
|
||||||
/**jsdoc
|
/**jsdoc
|
||||||
* Raise the Interface window if it is minimized. If raised, the window gains focus.
|
* Raise the Interface window if it is minimized. If raised, the window gains focus.
|
||||||
* @function Window.raiseMainWindow
|
* @function Window.raiseMainWindow
|
||||||
|
* @deprecated Use {@link Window.raise|raise} instead.
|
||||||
*/
|
*/
|
||||||
void raiseMainWindow();
|
void raiseMainWindow();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue