mirror of
https://github.com/lubosz/overte.git
synced 2025-08-08 03:48:38 +02:00
Fix Interface crash when using About.openUrl() in script
This commit is contained in:
parent
f7f8ea1e78
commit
7ea6452de0
1 changed files with 10 additions and 0 deletions
|
@ -45,6 +45,16 @@ QString AboutUtil::getQtVersion() const {
|
||||||
}
|
}
|
||||||
|
|
||||||
void AboutUtil::openUrl(const QString& url) const {
|
void AboutUtil::openUrl(const QString& url) const {
|
||||||
|
auto abboutUtilInstance = AboutUtil::getInstance();
|
||||||
|
if (!abboutUtilInstance) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (QThread::currentThread() != thread()) {
|
||||||
|
QMetaObject::invokeMethod(abboutUtilInstance, "openUrl", Q_ARG(const QString&, url));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
auto tablet = DependencyManager::get<TabletScriptingInterface>()->getTablet("com.highfidelity.interface.tablet.system");
|
auto tablet = DependencyManager::get<TabletScriptingInterface>()->getTablet("com.highfidelity.interface.tablet.system");
|
||||||
auto hmd = DependencyManager::get<HMDScriptingInterface>();
|
auto hmd = DependencyManager::get<HMDScriptingInterface>();
|
||||||
auto offscreenUi = DependencyManager::get<OffscreenUi>();
|
auto offscreenUi = DependencyManager::get<OffscreenUi>();
|
||||||
|
|
Loading…
Reference in a new issue