mirror of
https://github.com/lubosz/overte.git
synced 2025-04-08 04:42:20 +02:00
Switch to preprocessor macro for blocking invokes to capture function information
This commit is contained in:
parent
9c37b28ba0
commit
6fc82bb351
39 changed files with 124 additions and 118 deletions
|
@ -142,7 +142,7 @@ void AssignmentClient::stopAssignmentClient() {
|
|||
QThread* currentAssignmentThread = _currentAssignment->thread();
|
||||
|
||||
// ask the current assignment to stop
|
||||
hifi::qt::blockingInvokeMethod(_currentAssignment, "stop");
|
||||
BLOCKING_INVOKE_METHOD(_currentAssignment, "stop");
|
||||
|
||||
// ask the current assignment to delete itself on its thread
|
||||
_currentAssignment->deleteLater();
|
||||
|
|
|
@ -50,7 +50,7 @@ void ScriptableAvatar::stopAnimation() {
|
|||
AnimationDetails ScriptableAvatar::getAnimationDetails() {
|
||||
if (QThread::currentThread() != thread()) {
|
||||
AnimationDetails result;
|
||||
hifi::qt::blockingInvokeMethod(this, "getAnimationDetails",
|
||||
BLOCKING_INVOKE_METHOD(this, "getAnimationDetails",
|
||||
Q_RETURN_ARG(AnimationDetails, result));
|
||||
return result;
|
||||
}
|
||||
|
|
|
@ -1656,7 +1656,7 @@ QString Application::getUserAgent() {
|
|||
if (QThread::currentThread() != thread()) {
|
||||
QString userAgent;
|
||||
|
||||
hifi::qt::blockingInvokeMethod(this, "getUserAgent", Q_RETURN_ARG(QString, userAgent));
|
||||
BLOCKING_INVOKE_METHOD(this, "getUserAgent", Q_RETURN_ARG(QString, userAgent));
|
||||
|
||||
return userAgent;
|
||||
}
|
||||
|
|
|
@ -483,7 +483,7 @@ RayToAvatarIntersectionResult AvatarManager::findRayIntersection(const PickRay&
|
|||
const QScriptValue& avatarIdsToDiscard) {
|
||||
RayToAvatarIntersectionResult result;
|
||||
if (QThread::currentThread() != thread()) {
|
||||
hifi::qt::blockingInvokeMethod(const_cast<AvatarManager*>(this), "findRayIntersection",
|
||||
BLOCKING_INVOKE_METHOD(const_cast<AvatarManager*>(this), "findRayIntersection",
|
||||
Q_RETURN_ARG(RayToAvatarIntersectionResult, result),
|
||||
Q_ARG(const PickRay&, ray),
|
||||
Q_ARG(const QScriptValue&, avatarIdsToInclude),
|
||||
|
|
|
@ -898,7 +898,7 @@ void MyAvatar::restoreAnimation() {
|
|||
QStringList MyAvatar::getAnimationRoles() {
|
||||
if (QThread::currentThread() != thread()) {
|
||||
QStringList result;
|
||||
hifi::qt::blockingInvokeMethod(this, "getAnimationRoles", Q_RETURN_ARG(QStringList, result));
|
||||
BLOCKING_INVOKE_METHOD(this, "getAnimationRoles", Q_RETURN_ARG(QStringList, result));
|
||||
return result;
|
||||
}
|
||||
return _skeletonModel->getRig().getAnimationRoles();
|
||||
|
@ -1369,7 +1369,7 @@ void MyAvatar::resetFullAvatarURL() {
|
|||
void MyAvatar::useFullAvatarURL(const QUrl& fullAvatarURL, const QString& modelName) {
|
||||
|
||||
if (QThread::currentThread() != thread()) {
|
||||
hifi::qt::blockingInvokeMethod(this, "useFullAvatarURL",
|
||||
BLOCKING_INVOKE_METHOD(this, "useFullAvatarURL",
|
||||
Q_ARG(const QUrl&, fullAvatarURL),
|
||||
Q_ARG(const QString&, modelName));
|
||||
return;
|
||||
|
@ -1395,7 +1395,7 @@ void MyAvatar::useFullAvatarURL(const QUrl& fullAvatarURL, const QString& modelN
|
|||
|
||||
void MyAvatar::setAttachmentData(const QVector<AttachmentData>& attachmentData) {
|
||||
if (QThread::currentThread() != thread()) {
|
||||
hifi::qt::blockingInvokeMethod(this, "setAttachmentData",
|
||||
BLOCKING_INVOKE_METHOD(this, "setAttachmentData",
|
||||
Q_ARG(const QVector<AttachmentData>, attachmentData));
|
||||
return;
|
||||
}
|
||||
|
@ -2359,7 +2359,7 @@ bool MyAvatar::safeLanding(const glm::vec3& position) {
|
|||
|
||||
if (QThread::currentThread() != thread()) {
|
||||
bool result;
|
||||
hifi::qt::blockingInvokeMethod(this, "safeLanding", Q_RETURN_ARG(bool, result), Q_ARG(const glm::vec3&, position));
|
||||
BLOCKING_INVOKE_METHOD(this, "safeLanding", Q_RETURN_ARG(bool, result), Q_ARG(const glm::vec3&, position));
|
||||
return result;
|
||||
}
|
||||
glm::vec3 better;
|
||||
|
|
|
@ -27,7 +27,7 @@ float ClipboardScriptingInterface::getClipboardContentsLargestDimension() {
|
|||
|
||||
bool ClipboardScriptingInterface::exportEntities(const QString& filename, const QVector<EntityItemID>& entityIDs) {
|
||||
bool retVal;
|
||||
hifi::qt::blockingInvokeMethod(qApp, "exportEntities",
|
||||
BLOCKING_INVOKE_METHOD(qApp, "exportEntities",
|
||||
Q_RETURN_ARG(bool, retVal),
|
||||
Q_ARG(const QString&, filename),
|
||||
Q_ARG(const QVector<EntityItemID>&, entityIDs));
|
||||
|
@ -36,7 +36,7 @@ bool ClipboardScriptingInterface::exportEntities(const QString& filename, const
|
|||
|
||||
bool ClipboardScriptingInterface::exportEntities(const QString& filename, float x, float y, float z, float s) {
|
||||
bool retVal;
|
||||
hifi::qt::blockingInvokeMethod(qApp, "exportEntities",
|
||||
BLOCKING_INVOKE_METHOD(qApp, "exportEntities",
|
||||
Q_RETURN_ARG(bool, retVal),
|
||||
Q_ARG(const QString&, filename),
|
||||
Q_ARG(float, x),
|
||||
|
@ -48,7 +48,7 @@ bool ClipboardScriptingInterface::exportEntities(const QString& filename, float
|
|||
|
||||
bool ClipboardScriptingInterface::importEntities(const QString& filename) {
|
||||
bool retVal;
|
||||
hifi::qt::blockingInvokeMethod(qApp, "importEntities",
|
||||
BLOCKING_INVOKE_METHOD(qApp, "importEntities",
|
||||
Q_RETURN_ARG(bool, retVal),
|
||||
Q_ARG(const QString&, filename));
|
||||
return retVal;
|
||||
|
@ -56,7 +56,7 @@ bool ClipboardScriptingInterface::importEntities(const QString& filename) {
|
|||
|
||||
QVector<EntityItemID> ClipboardScriptingInterface::pasteEntities(glm::vec3 position) {
|
||||
QVector<EntityItemID> retVal;
|
||||
hifi::qt::blockingInvokeMethod(qApp, "pasteEntities",
|
||||
BLOCKING_INVOKE_METHOD(qApp, "pasteEntities",
|
||||
Q_RETURN_ARG(QVector<EntityItemID>, retVal),
|
||||
Q_ARG(float, position.x),
|
||||
Q_ARG(float, position.y),
|
||||
|
|
|
@ -156,7 +156,7 @@ QString HMDScriptingInterface::preferredAudioOutput() const {
|
|||
bool HMDScriptingInterface::setHandLasers(int hands, bool enabled, const glm::vec4& color, const glm::vec3& direction) {
|
||||
if (QThread::currentThread() != thread()) {
|
||||
bool result;
|
||||
hifi::qt::blockingInvokeMethod(this, "setHandLasers", Q_RETURN_ARG(bool, result),
|
||||
BLOCKING_INVOKE_METHOD(this, "setHandLasers", Q_RETURN_ARG(bool, result),
|
||||
Q_ARG(int, hands), Q_ARG(bool, enabled), Q_ARG(glm::vec4, color), Q_ARG(glm::vec3, direction));
|
||||
return result;
|
||||
}
|
||||
|
@ -171,7 +171,7 @@ bool HMDScriptingInterface::setHandLasers(int hands, bool enabled, const glm::ve
|
|||
bool HMDScriptingInterface::setExtraLaser(const glm::vec3& worldStart, bool enabled, const glm::vec4& color, const glm::vec3& direction) {
|
||||
if (QThread::currentThread() != thread()) {
|
||||
bool result;
|
||||
hifi::qt::blockingInvokeMethod(this, "setExtraLaser", Q_RETURN_ARG(bool, result),
|
||||
BLOCKING_INVOKE_METHOD(this, "setExtraLaser", Q_RETURN_ARG(bool, result),
|
||||
Q_ARG(glm::vec3, worldStart), Q_ARG(bool, enabled), Q_ARG(glm::vec4, color), Q_ARG(glm::vec3, direction));
|
||||
return result;
|
||||
}
|
||||
|
|
|
@ -44,7 +44,7 @@ bool MenuScriptingInterface::menuExists(const QString& menu) {
|
|||
return Menu::getInstance()->menuExists(menu);
|
||||
}
|
||||
bool result;
|
||||
hifi::qt::blockingInvokeMethod(Menu::getInstance(), "menuExists",
|
||||
BLOCKING_INVOKE_METHOD(Menu::getInstance(), "menuExists",
|
||||
Q_RETURN_ARG(bool, result),
|
||||
Q_ARG(const QString&, menu));
|
||||
return result;
|
||||
|
@ -87,7 +87,7 @@ bool MenuScriptingInterface::menuItemExists(const QString& menu, const QString&
|
|||
return Menu::getInstance()->menuItemExists(menu, menuitem);
|
||||
}
|
||||
bool result;
|
||||
hifi::qt::blockingInvokeMethod(Menu::getInstance(), "menuItemExists",
|
||||
BLOCKING_INVOKE_METHOD(Menu::getInstance(), "menuItemExists",
|
||||
Q_RETURN_ARG(bool, result),
|
||||
Q_ARG(const QString&, menu),
|
||||
Q_ARG(const QString&, menuitem));
|
||||
|
@ -115,7 +115,7 @@ bool MenuScriptingInterface::isOptionChecked(const QString& menuOption) {
|
|||
return Menu::getInstance()->isOptionChecked(menuOption);
|
||||
}
|
||||
bool result;
|
||||
hifi::qt::blockingInvokeMethod(Menu::getInstance(), "isOptionChecked",
|
||||
BLOCKING_INVOKE_METHOD(Menu::getInstance(), "isOptionChecked",
|
||||
Q_RETURN_ARG(bool, result),
|
||||
Q_ARG(const QString&, menuOption));
|
||||
return result;
|
||||
|
@ -132,7 +132,7 @@ bool MenuScriptingInterface::isMenuEnabled(const QString& menuOption) {
|
|||
return Menu::getInstance()->isOptionChecked(menuOption);
|
||||
}
|
||||
bool result;
|
||||
hifi::qt::blockingInvokeMethod(Menu::getInstance(), "isMenuEnabled",
|
||||
BLOCKING_INVOKE_METHOD(Menu::getInstance(), "isMenuEnabled",
|
||||
Q_RETURN_ARG(bool, result),
|
||||
Q_ARG(const QString&, menuOption));
|
||||
return result;
|
||||
|
@ -158,7 +158,7 @@ bool MenuScriptingInterface::isInfoViewVisible(const QString& path) {
|
|||
}
|
||||
|
||||
bool result;
|
||||
hifi::qt::blockingInvokeMethod(Menu::getInstance(), "isInfoViewVisible",
|
||||
BLOCKING_INVOKE_METHOD(Menu::getInstance(), "isInfoViewVisible",
|
||||
Q_RETURN_ARG(bool, result), Q_ARG(const QString&, path));
|
||||
return result;
|
||||
}
|
||||
|
|
|
@ -60,7 +60,7 @@ void TestScriptingInterface::waitIdle() {
|
|||
bool TestScriptingInterface::loadTestScene(QString scene) {
|
||||
if (QThread::currentThread() != thread()) {
|
||||
bool result;
|
||||
hifi::qt::blockingInvokeMethod(this, "loadTestScene", Q_RETURN_ARG(bool, result), Q_ARG(QString, scene));
|
||||
BLOCKING_INVOKE_METHOD(this, "loadTestScene", Q_RETURN_ARG(bool, result), Q_ARG(QString, scene));
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
|
@ -317,7 +317,7 @@ bool WindowScriptingInterface::isPhysicsEnabled() {
|
|||
int WindowScriptingInterface::openMessageBox(QString title, QString text, int buttons, int defaultButton) {
|
||||
if (QThread::currentThread() != thread()) {
|
||||
int result;
|
||||
hifi::qt::blockingInvokeMethod(this, "openMessageBox",
|
||||
BLOCKING_INVOKE_METHOD(this, "openMessageBox",
|
||||
Q_RETURN_ARG(int, result),
|
||||
Q_ARG(QString, title),
|
||||
Q_ARG(QString, text),
|
||||
|
|
|
@ -116,7 +116,7 @@ void JSConsole::executeCommand(const QString& command) {
|
|||
|
||||
QScriptValue JSConsole::executeCommandInWatcher(const QString& command) {
|
||||
QScriptValue result;
|
||||
hifi::qt::blockingInvokeMethod(_scriptEngine, "evaluate",
|
||||
BLOCKING_INVOKE_METHOD(_scriptEngine, "evaluate",
|
||||
Q_RETURN_ARG(QScriptValue, result),
|
||||
Q_ARG(const QString&, command),
|
||||
Q_ARG(const QString&, _consoleFileName));
|
||||
|
|
|
@ -145,7 +145,7 @@ Overlay::Pointer Overlays::getOverlay(OverlayID id) const {
|
|||
OverlayID Overlays::addOverlay(const QString& type, const QVariant& properties) {
|
||||
if (QThread::currentThread() != thread()) {
|
||||
OverlayID result;
|
||||
hifi::qt::blockingInvokeMethod(this, "addOverlay", Q_RETURN_ARG(OverlayID, result), Q_ARG(QString, type), Q_ARG(QVariant, properties));
|
||||
BLOCKING_INVOKE_METHOD(this, "addOverlay", Q_RETURN_ARG(OverlayID, result), Q_ARG(QString, type), Q_ARG(QVariant, properties));
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -209,7 +209,7 @@ OverlayID Overlays::addOverlay(const Overlay::Pointer& overlay) {
|
|||
OverlayID Overlays::cloneOverlay(OverlayID id) {
|
||||
if (QThread::currentThread() != thread()) {
|
||||
OverlayID result;
|
||||
hifi::qt::blockingInvokeMethod(this, "cloneOverlay", Q_RETURN_ARG(OverlayID, result), Q_ARG(OverlayID, id));
|
||||
BLOCKING_INVOKE_METHOD(this, "cloneOverlay", Q_RETURN_ARG(OverlayID, result), Q_ARG(OverlayID, id));
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -232,7 +232,7 @@ OverlayID Overlays::cloneOverlay(OverlayID id) {
|
|||
bool Overlays::editOverlay(OverlayID id, const QVariant& properties) {
|
||||
if (QThread::currentThread() != thread()) {
|
||||
bool result;
|
||||
hifi::qt::blockingInvokeMethod(this, "editOverlay", Q_RETURN_ARG(bool, result), Q_ARG(OverlayID, id), Q_ARG(QVariant, properties));
|
||||
BLOCKING_INVOKE_METHOD(this, "editOverlay", Q_RETURN_ARG(bool, result), Q_ARG(OverlayID, id), Q_ARG(QVariant, properties));
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -247,7 +247,7 @@ bool Overlays::editOverlay(OverlayID id, const QVariant& properties) {
|
|||
bool Overlays::editOverlays(const QVariant& propertiesById) {
|
||||
if (QThread::currentThread() != thread()) {
|
||||
bool result;
|
||||
hifi::qt::blockingInvokeMethod(this, "editOverlays", Q_RETURN_ARG(bool, result), Q_ARG(QVariant, propertiesById));
|
||||
BLOCKING_INVOKE_METHOD(this, "editOverlays", Q_RETURN_ARG(bool, result), Q_ARG(QVariant, propertiesById));
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -299,7 +299,7 @@ void Overlays::deleteOverlay(OverlayID id) {
|
|||
QString Overlays::getOverlayType(OverlayID overlayId) {
|
||||
if (QThread::currentThread() != thread()) {
|
||||
QString result;
|
||||
hifi::qt::blockingInvokeMethod(this, "getOverlayType", Q_RETURN_ARG(QString, result), Q_ARG(OverlayID, overlayId));
|
||||
BLOCKING_INVOKE_METHOD(this, "getOverlayType", Q_RETURN_ARG(QString, result), Q_ARG(OverlayID, overlayId));
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -313,7 +313,7 @@ QString Overlays::getOverlayType(OverlayID overlayId) {
|
|||
QObject* Overlays::getOverlayObject(OverlayID id) {
|
||||
if (QThread::currentThread() != thread()) {
|
||||
QObject* result;
|
||||
hifi::qt::blockingInvokeMethod(this, "getOverlayObject", Q_RETURN_ARG(QObject*, result), Q_ARG(OverlayID, id));
|
||||
BLOCKING_INVOKE_METHOD(this, "getOverlayObject", Q_RETURN_ARG(QObject*, result), Q_ARG(OverlayID, id));
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -370,7 +370,7 @@ void Overlays::setParentPanel(OverlayID childId, OverlayID panelId) {
|
|||
OverlayID Overlays::getOverlayAtPoint(const glm::vec2& point) {
|
||||
if (QThread::currentThread() != thread()) {
|
||||
OverlayID result;
|
||||
hifi::qt::blockingInvokeMethod(this, "getOverlayAtPoint", Q_RETURN_ARG(OverlayID, result), Q_ARG(glm::vec2, point));
|
||||
BLOCKING_INVOKE_METHOD(this, "getOverlayAtPoint", Q_RETURN_ARG(OverlayID, result), Q_ARG(glm::vec2, point));
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -408,7 +408,7 @@ OverlayID Overlays::getOverlayAtPoint(const glm::vec2& point) {
|
|||
OverlayPropertyResult Overlays::getProperty(OverlayID id, const QString& property) {
|
||||
if (QThread::currentThread() != thread()) {
|
||||
OverlayPropertyResult result;
|
||||
hifi::qt::blockingInvokeMethod(this, "getProperty", Q_RETURN_ARG(OverlayPropertyResult, result), Q_ARG(OverlayID, id), Q_ARG(QString, property));
|
||||
BLOCKING_INVOKE_METHOD(this, "getProperty", Q_RETURN_ARG(OverlayPropertyResult, result), Q_ARG(OverlayID, id), Q_ARG(QString, property));
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -453,7 +453,7 @@ RayToOverlayIntersectionResult Overlays::findRayIntersectionInternal(const PickR
|
|||
bool visibleOnly, bool collidableOnly) {
|
||||
if (QThread::currentThread() != thread()) {
|
||||
RayToOverlayIntersectionResult result;
|
||||
hifi::qt::blockingInvokeMethod(this, "findRayIntersectionInternal", Q_RETURN_ARG(RayToOverlayIntersectionResult, result),
|
||||
BLOCKING_INVOKE_METHOD(this, "findRayIntersectionInternal", Q_RETURN_ARG(RayToOverlayIntersectionResult, result),
|
||||
Q_ARG(PickRay, ray),
|
||||
Q_ARG(bool, precisionPicking),
|
||||
Q_ARG(QVector<OverlayID>, overlaysToInclude),
|
||||
|
@ -580,7 +580,7 @@ void RayToOverlayIntersectionResultFromScriptValue(const QScriptValue& objectVar
|
|||
bool Overlays::isLoaded(OverlayID id) {
|
||||
if (QThread::currentThread() != thread()) {
|
||||
bool result;
|
||||
hifi::qt::blockingInvokeMethod(this, "isLoaded", Q_RETURN_ARG(bool, result), Q_ARG(OverlayID, id));
|
||||
BLOCKING_INVOKE_METHOD(this, "isLoaded", Q_RETURN_ARG(bool, result), Q_ARG(OverlayID, id));
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -594,7 +594,7 @@ bool Overlays::isLoaded(OverlayID id) {
|
|||
QSizeF Overlays::textSize(OverlayID id, const QString& text) {
|
||||
if (QThread::currentThread() != thread()) {
|
||||
QSizeF result;
|
||||
hifi::qt::blockingInvokeMethod(this, "textSize", Q_RETURN_ARG(QSizeF, result), Q_ARG(OverlayID, id), Q_ARG(QString, text));
|
||||
BLOCKING_INVOKE_METHOD(this, "textSize", Q_RETURN_ARG(QSizeF, result), Q_ARG(OverlayID, id), Q_ARG(QString, text));
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -671,7 +671,7 @@ void Overlays::deletePanel(OverlayID panelId) {
|
|||
bool Overlays::isAddedOverlay(OverlayID id) {
|
||||
if (QThread::currentThread() != thread()) {
|
||||
bool result;
|
||||
hifi::qt::blockingInvokeMethod(this, "isAddedOverlay", Q_RETURN_ARG(bool, result), Q_ARG(OverlayID, id));
|
||||
BLOCKING_INVOKE_METHOD(this, "isAddedOverlay", Q_RETURN_ARG(bool, result), Q_ARG(OverlayID, id));
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -705,7 +705,7 @@ void Overlays::sendHoverLeaveOverlay(OverlayID id, PointerEvent event) {
|
|||
OverlayID Overlays::getKeyboardFocusOverlay() {
|
||||
if (QThread::currentThread() != thread()) {
|
||||
OverlayID result;
|
||||
hifi::qt::blockingInvokeMethod(this, "getKeyboardFocusOverlay", Q_RETURN_ARG(OverlayID, result));
|
||||
BLOCKING_INVOKE_METHOD(this, "getKeyboardFocusOverlay", Q_RETURN_ARG(OverlayID, result));
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -724,7 +724,7 @@ void Overlays::setKeyboardFocusOverlay(OverlayID id) {
|
|||
float Overlays::width() {
|
||||
if (QThread::currentThread() != thread()) {
|
||||
float result;
|
||||
hifi::qt::blockingInvokeMethod(this, "width", Q_RETURN_ARG(float, result));
|
||||
BLOCKING_INVOKE_METHOD(this, "width", Q_RETURN_ARG(float, result));
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -735,7 +735,7 @@ float Overlays::width() {
|
|||
float Overlays::height() {
|
||||
if (QThread::currentThread() != thread()) {
|
||||
float result;
|
||||
hifi::qt::blockingInvokeMethod(this, "height", Q_RETURN_ARG(float, result));
|
||||
BLOCKING_INVOKE_METHOD(this, "height", Q_RETURN_ARG(float, result));
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -945,7 +945,7 @@ bool Overlays::mouseMoveEvent(QMouseEvent* event) {
|
|||
QVector<QUuid> Overlays::findOverlays(const glm::vec3& center, float radius) {
|
||||
QVector<QUuid> result;
|
||||
if (QThread::currentThread() != thread()) {
|
||||
hifi::qt::blockingInvokeMethod(this, "findOverlays", Q_RETURN_ARG(QVector<QUuid>, result), Q_ARG(glm::vec3, center), Q_ARG(float, radius));
|
||||
BLOCKING_INVOKE_METHOD(this, "findOverlays", Q_RETURN_ARG(QVector<QUuid>, result), Q_ARG(glm::vec3, center), Q_ARG(float, radius));
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ AnimationCache::AnimationCache(QObject* parent) :
|
|||
AnimationPointer AnimationCache::getAnimation(const QUrl& url) {
|
||||
if (QThread::currentThread() != thread()) {
|
||||
AnimationPointer result;
|
||||
hifi::qt::blockingInvokeMethod(this, "getAnimation",
|
||||
BLOCKING_INVOKE_METHOD(this, "getAnimation",
|
||||
Q_RETURN_ARG(AnimationPointer, result), Q_ARG(const QUrl&, url));
|
||||
return result;
|
||||
}
|
||||
|
@ -100,7 +100,7 @@ bool Animation::isLoaded() const {
|
|||
QStringList Animation::getJointNames() const {
|
||||
if (QThread::currentThread() != thread()) {
|
||||
QStringList result;
|
||||
hifi::qt::blockingInvokeMethod(const_cast<Animation*>(this), "getJointNames",
|
||||
BLOCKING_INVOKE_METHOD(const_cast<Animation*>(this), "getJointNames",
|
||||
Q_RETURN_ARG(QStringList, result));
|
||||
return result;
|
||||
}
|
||||
|
@ -114,7 +114,7 @@ QStringList Animation::getJointNames() const {
|
|||
QVector<FBXAnimationFrame> Animation::getFrames() const {
|
||||
if (QThread::currentThread() != thread()) {
|
||||
QVector<FBXAnimationFrame> result;
|
||||
hifi::qt::blockingInvokeMethod(const_cast<Animation*>(this), "getFrames",
|
||||
BLOCKING_INVOKE_METHOD(const_cast<Animation*>(this), "getFrames",
|
||||
Q_RETURN_ARG(QVector<FBXAnimationFrame>, result));
|
||||
return result;
|
||||
}
|
||||
|
|
|
@ -32,7 +32,7 @@ SoundCache::SoundCache(QObject* parent) :
|
|||
SharedSoundPointer SoundCache::getSound(const QUrl& url) {
|
||||
if (QThread::currentThread() != thread()) {
|
||||
SharedSoundPointer result;
|
||||
hifi::qt::blockingInvokeMethod(this, "getSound",
|
||||
BLOCKING_INVOKE_METHOD(this, "getSound",
|
||||
Q_RETURN_ARG(SharedSoundPointer, result), Q_ARG(const QUrl&, url));
|
||||
return result;
|
||||
}
|
||||
|
|
|
@ -1011,7 +1011,7 @@ glm::vec3 Avatar::getAbsoluteJointTranslationInObjectFrame(int index) const {
|
|||
int Avatar::getJointIndex(const QString& name) const {
|
||||
if (QThread::currentThread() != thread()) {
|
||||
int result;
|
||||
hifi::qt::blockingInvokeMethod(const_cast<Avatar*>(this), "getJointIndex",
|
||||
BLOCKING_INVOKE_METHOD(const_cast<Avatar*>(this), "getJointIndex",
|
||||
Q_RETURN_ARG(int, result), Q_ARG(const QString&, name));
|
||||
return result;
|
||||
}
|
||||
|
@ -1025,7 +1025,7 @@ int Avatar::getJointIndex(const QString& name) const {
|
|||
QStringList Avatar::getJointNames() const {
|
||||
if (QThread::currentThread() != thread()) {
|
||||
QStringList result;
|
||||
hifi::qt::blockingInvokeMethod(const_cast<Avatar*>(this), "getJointNames",
|
||||
BLOCKING_INVOKE_METHOD(const_cast<Avatar*>(this), "getJointNames",
|
||||
Q_RETURN_ARG(QStringList, result));
|
||||
return result;
|
||||
}
|
||||
|
@ -1035,7 +1035,7 @@ QStringList Avatar::getJointNames() const {
|
|||
glm::vec3 Avatar::getJointPosition(int index) const {
|
||||
if (QThread::currentThread() != thread()) {
|
||||
glm::vec3 position;
|
||||
hifi::qt::blockingInvokeMethod(const_cast<Avatar*>(this), "getJointPosition",
|
||||
BLOCKING_INVOKE_METHOD(const_cast<Avatar*>(this), "getJointPosition",
|
||||
Q_RETURN_ARG(glm::vec3, position), Q_ARG(const int, index));
|
||||
return position;
|
||||
}
|
||||
|
@ -1047,7 +1047,7 @@ glm::vec3 Avatar::getJointPosition(int index) const {
|
|||
glm::vec3 Avatar::getJointPosition(const QString& name) const {
|
||||
if (QThread::currentThread() != thread()) {
|
||||
glm::vec3 position;
|
||||
hifi::qt::blockingInvokeMethod(const_cast<Avatar*>(this), "getJointPosition",
|
||||
BLOCKING_INVOKE_METHOD(const_cast<Avatar*>(this), "getJointPosition",
|
||||
Q_RETURN_ARG(glm::vec3, position), Q_ARG(const QString&, name));
|
||||
return position;
|
||||
}
|
||||
|
@ -1106,7 +1106,7 @@ static std::shared_ptr<Model> allocateAttachmentModel(bool isSoft, const Rig& ri
|
|||
|
||||
void Avatar::setAttachmentData(const QVector<AttachmentData>& attachmentData) {
|
||||
if (QThread::currentThread() != thread()) {
|
||||
hifi::qt::blockingInvokeMethod(this, "setAttachmentData",
|
||||
BLOCKING_INVOKE_METHOD(this, "setAttachmentData",
|
||||
Q_ARG(const QVector<AttachmentData>, attachmentData));
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -1228,7 +1228,7 @@ bool AvatarData::isJointDataValid(int index) const {
|
|||
}
|
||||
if (QThread::currentThread() != thread()) {
|
||||
bool result;
|
||||
hifi::qt::blockingInvokeMethod(const_cast<AvatarData*>(this), "isJointDataValid",
|
||||
BLOCKING_INVOKE_METHOD(const_cast<AvatarData*>(this), "isJointDataValid",
|
||||
Q_RETURN_ARG(bool, result), Q_ARG(int, index));
|
||||
return result;
|
||||
}
|
||||
|
@ -1241,7 +1241,7 @@ glm::quat AvatarData::getJointRotation(int index) const {
|
|||
}
|
||||
if (QThread::currentThread() != thread()) {
|
||||
glm::quat result;
|
||||
hifi::qt::blockingInvokeMethod(const_cast<AvatarData*>(this), "getJointRotation",
|
||||
BLOCKING_INVOKE_METHOD(const_cast<AvatarData*>(this), "getJointRotation",
|
||||
Q_RETURN_ARG(glm::quat, result), Q_ARG(int, index));
|
||||
return result;
|
||||
}
|
||||
|
@ -1256,7 +1256,7 @@ glm::vec3 AvatarData::getJointTranslation(int index) const {
|
|||
}
|
||||
if (QThread::currentThread() != thread()) {
|
||||
glm::vec3 result;
|
||||
hifi::qt::blockingInvokeMethod(const_cast<AvatarData*>(this), "getJointTranslation",
|
||||
BLOCKING_INVOKE_METHOD(const_cast<AvatarData*>(this), "getJointTranslation",
|
||||
Q_RETURN_ARG(glm::vec3, result), Q_ARG(int, index));
|
||||
return result;
|
||||
}
|
||||
|
@ -1267,7 +1267,7 @@ glm::vec3 AvatarData::getJointTranslation(int index) const {
|
|||
glm::vec3 AvatarData::getJointTranslation(const QString& name) const {
|
||||
if (QThread::currentThread() != thread()) {
|
||||
glm::vec3 result;
|
||||
hifi::qt::blockingInvokeMethod(const_cast<AvatarData*>(this), "getJointTranslation",
|
||||
BLOCKING_INVOKE_METHOD(const_cast<AvatarData*>(this), "getJointTranslation",
|
||||
Q_RETURN_ARG(glm::vec3, result), Q_ARG(const QString&, name));
|
||||
return result;
|
||||
}
|
||||
|
@ -1345,7 +1345,7 @@ void AvatarData::clearJointData(const QString& name) {
|
|||
bool AvatarData::isJointDataValid(const QString& name) const {
|
||||
if (QThread::currentThread() != thread()) {
|
||||
bool result;
|
||||
hifi::qt::blockingInvokeMethod(const_cast<AvatarData*>(this), "isJointDataValid",
|
||||
BLOCKING_INVOKE_METHOD(const_cast<AvatarData*>(this), "isJointDataValid",
|
||||
Q_RETURN_ARG(bool, result), Q_ARG(const QString&, name));
|
||||
return result;
|
||||
}
|
||||
|
@ -1355,7 +1355,7 @@ bool AvatarData::isJointDataValid(const QString& name) const {
|
|||
glm::quat AvatarData::getJointRotation(const QString& name) const {
|
||||
if (QThread::currentThread() != thread()) {
|
||||
glm::quat result;
|
||||
hifi::qt::blockingInvokeMethod(const_cast<AvatarData*>(this), "getJointRotation",
|
||||
BLOCKING_INVOKE_METHOD(const_cast<AvatarData*>(this), "getJointRotation",
|
||||
Q_RETURN_ARG(glm::quat, result), Q_ARG(const QString&, name));
|
||||
return result;
|
||||
}
|
||||
|
@ -1365,7 +1365,7 @@ glm::quat AvatarData::getJointRotation(const QString& name) const {
|
|||
QVector<glm::quat> AvatarData::getJointRotations() const {
|
||||
if (QThread::currentThread() != thread()) {
|
||||
QVector<glm::quat> result;
|
||||
hifi::qt::blockingInvokeMethod(const_cast<AvatarData*>(this), "getJointRotations",
|
||||
BLOCKING_INVOKE_METHOD(const_cast<AvatarData*>(this), "getJointRotations",
|
||||
Q_RETURN_ARG(QVector<glm::quat>, result));
|
||||
return result;
|
||||
}
|
||||
|
@ -1380,7 +1380,7 @@ QVector<glm::quat> AvatarData::getJointRotations() const {
|
|||
void AvatarData::setJointRotations(QVector<glm::quat> jointRotations) {
|
||||
if (QThread::currentThread() != thread()) {
|
||||
QVector<glm::quat> result;
|
||||
hifi::qt::blockingInvokeMethod(const_cast<AvatarData*>(this), "setJointRotations",
|
||||
BLOCKING_INVOKE_METHOD(const_cast<AvatarData*>(this), "setJointRotations",
|
||||
Q_ARG(QVector<glm::quat>, jointRotations));
|
||||
}
|
||||
QWriteLocker writeLock(&_jointDataLock);
|
||||
|
@ -1397,7 +1397,7 @@ void AvatarData::setJointRotations(QVector<glm::quat> jointRotations) {
|
|||
QVector<glm::vec3> AvatarData::getJointTranslations() const {
|
||||
if (QThread::currentThread() != thread()) {
|
||||
QVector<glm::vec3> result;
|
||||
hifi::qt::blockingInvokeMethod(const_cast<AvatarData*>(this), "getJointTranslations",
|
||||
BLOCKING_INVOKE_METHOD(const_cast<AvatarData*>(this), "getJointTranslations",
|
||||
Q_RETURN_ARG(QVector<glm::vec3>, result));
|
||||
return result;
|
||||
}
|
||||
|
@ -1412,7 +1412,7 @@ QVector<glm::vec3> AvatarData::getJointTranslations() const {
|
|||
void AvatarData::setJointTranslations(QVector<glm::vec3> jointTranslations) {
|
||||
if (QThread::currentThread() != thread()) {
|
||||
QVector<glm::quat> result;
|
||||
hifi::qt::blockingInvokeMethod(const_cast<AvatarData*>(this), "setJointTranslations",
|
||||
BLOCKING_INVOKE_METHOD(const_cast<AvatarData*>(this), "setJointTranslations",
|
||||
Q_ARG(QVector<glm::vec3>, jointTranslations));
|
||||
}
|
||||
QWriteLocker writeLock(&_jointDataLock);
|
||||
|
@ -1613,7 +1613,7 @@ void AvatarData::setDisplayName(const QString& displayName) {
|
|||
QVector<AttachmentData> AvatarData::getAttachmentData() const {
|
||||
if (QThread::currentThread() != thread()) {
|
||||
QVector<AttachmentData> result;
|
||||
hifi::qt::blockingInvokeMethod(const_cast<AvatarData*>(this), "getAttachmentData",
|
||||
BLOCKING_INVOKE_METHOD(const_cast<AvatarData*>(this), "getAttachmentData",
|
||||
Q_RETURN_ARG(QVector<AttachmentData>, result));
|
||||
return result;
|
||||
}
|
||||
|
@ -2336,7 +2336,7 @@ void AvatarData::clearAvatarEntity(const QUuid& entityID) {
|
|||
AvatarEntityMap AvatarData::getAvatarEntityData() const {
|
||||
AvatarEntityMap result;
|
||||
if (QThread::currentThread() != thread()) {
|
||||
hifi::qt::blockingInvokeMethod(const_cast<AvatarData*>(this), "getAvatarEntityData",
|
||||
BLOCKING_INVOKE_METHOD(const_cast<AvatarData*>(this), "getAvatarEntityData",
|
||||
Q_RETURN_ARG(AvatarEntityMap, result));
|
||||
return result;
|
||||
}
|
||||
|
@ -2377,7 +2377,7 @@ void AvatarData::setAvatarEntityData(const AvatarEntityMap& avatarEntityData) {
|
|||
AvatarEntityIDs AvatarData::getAndClearRecentlyDetachedIDs() {
|
||||
AvatarEntityIDs result;
|
||||
if (QThread::currentThread() != thread()) {
|
||||
hifi::qt::blockingInvokeMethod(const_cast<AvatarData*>(this), "getAndClearRecentlyDetachedIDs",
|
||||
BLOCKING_INVOKE_METHOD(const_cast<AvatarData*>(this), "getAndClearRecentlyDetachedIDs",
|
||||
Q_RETURN_ARG(AvatarEntityIDs, result));
|
||||
return result;
|
||||
}
|
||||
|
|
|
@ -291,7 +291,7 @@ glm::vec2 CompositorHelper::getReticleMaximumPosition() const {
|
|||
|
||||
void CompositorHelper::sendFakeMouseEvent() {
|
||||
if (qApp->thread() != QThread::currentThread()) {
|
||||
hifi::qt::blockingInvokeMethod(this, "sendFakeMouseEvent");
|
||||
BLOCKING_INVOKE_METHOD(this, "sendFakeMouseEvent");
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -381,7 +381,7 @@ ModelPointer EntityTreeRenderer::allocateModel(const QString& url, float loading
|
|||
|
||||
// Only create and delete models on the thread that owns the EntityTreeRenderer
|
||||
if (QThread::currentThread() != thread()) {
|
||||
hifi::qt::blockingInvokeMethod(this, "allocateModel",
|
||||
BLOCKING_INVOKE_METHOD(this, "allocateModel",
|
||||
Q_RETURN_ARG(ModelPointer, model),
|
||||
Q_ARG(const QString&, url));
|
||||
|
||||
|
@ -398,7 +398,7 @@ ModelPointer EntityTreeRenderer::allocateModel(const QString& url, float loading
|
|||
ModelPointer EntityTreeRenderer::updateModel(ModelPointer model, const QString& newUrl) {
|
||||
// Only create and delete models on the thread that owns the EntityTreeRenderer
|
||||
if (QThread::currentThread() != thread()) {
|
||||
hifi::qt::blockingInvokeMethod(this, "updateModel",
|
||||
BLOCKING_INVOKE_METHOD(this, "updateModel",
|
||||
Q_RETURN_ARG(ModelPointer, model),
|
||||
Q_ARG(ModelPointer, model),
|
||||
Q_ARG(const QString&, newUrl));
|
||||
|
|
|
@ -1489,7 +1489,7 @@ int EntityScriptingInterface::getJointIndex(const QUuid& entityID, const QString
|
|||
return -1;
|
||||
}
|
||||
int result;
|
||||
hifi::qt::blockingInvokeMethod(_entityTree.get(), "getJointIndex",
|
||||
BLOCKING_INVOKE_METHOD(_entityTree.get(), "getJointIndex",
|
||||
Q_RETURN_ARG(int, result), Q_ARG(QUuid, entityID), Q_ARG(QString, name));
|
||||
return result;
|
||||
}
|
||||
|
@ -1499,7 +1499,7 @@ QStringList EntityScriptingInterface::getJointNames(const QUuid& entityID) {
|
|||
return QStringList();
|
||||
}
|
||||
QStringList result;
|
||||
hifi::qt::blockingInvokeMethod(_entityTree.get(), "getJointNames",
|
||||
BLOCKING_INVOKE_METHOD(_entityTree.get(), "getJointNames",
|
||||
Q_RETURN_ARG(QStringList, result), Q_ARG(QUuid, entityID));
|
||||
return result;
|
||||
}
|
||||
|
|
|
@ -233,7 +233,7 @@ void NodeList::processICEPingPacket(QSharedPointer<ReceivedMessage> message) {
|
|||
|
||||
void NodeList::reset() {
|
||||
if (thread() != QThread::currentThread()) {
|
||||
hifi::qt::blockingInvokeMethod(this, "reset");
|
||||
QMetaObject::invokeMethod(this, "reset");
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -180,7 +180,7 @@ ScriptableResource* ResourceCache::prefetch(const QUrl& url, void* extra) {
|
|||
|
||||
if (QThread::currentThread() != thread()) {
|
||||
// Must be called in thread to ensure getResource returns a valid pointer
|
||||
hifi::qt::blockingInvokeMethod(this, "prefetch",
|
||||
BLOCKING_INVOKE_METHOD(this, "prefetch",
|
||||
Q_RETURN_ARG(ScriptableResource*, result),
|
||||
Q_ARG(QUrl, url), Q_ARG(void*, extra));
|
||||
return result;
|
||||
|
@ -303,7 +303,7 @@ QVariantList ResourceCache::getResourceList() {
|
|||
QVariantList list;
|
||||
if (QThread::currentThread() != thread()) {
|
||||
// NOTE: invokeMethod does not allow a const QObject*
|
||||
hifi::qt::blockingInvokeMethod(this, "getResourceList",
|
||||
BLOCKING_INVOKE_METHOD(this, "getResourceList",
|
||||
Q_RETURN_ARG(QVariantList, list));
|
||||
} else {
|
||||
auto resources = _resources.uniqueKeys();
|
||||
|
|
|
@ -277,7 +277,7 @@ Connection* Socket::findOrCreateConnection(const HifiSockAddr& sockAddr) {
|
|||
|
||||
void Socket::clearConnections() {
|
||||
if (QThread::currentThread() != thread()) {
|
||||
hifi::qt::blockingInvokeMethod(this, "clearConnections");
|
||||
BLOCKING_INVOKE_METHOD(this, "clearConnections");
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ InputConfiguration::InputConfiguration() {
|
|||
QStringList InputConfiguration::inputPlugins() {
|
||||
if (QThread::currentThread() != thread()) {
|
||||
QStringList result;
|
||||
hifi::qt::blockingInvokeMethod(this, "inputPlugins",
|
||||
BLOCKING_INVOKE_METHOD(this, "inputPlugins",
|
||||
Q_RETURN_ARG(QStringList, result));
|
||||
return result;
|
||||
}
|
||||
|
@ -44,7 +44,7 @@ QStringList InputConfiguration::inputPlugins() {
|
|||
QStringList InputConfiguration::activeInputPlugins() {
|
||||
if (QThread::currentThread() != thread()) {
|
||||
QStringList result;
|
||||
hifi::qt::blockingInvokeMethod(this, "activeInputPlugins",
|
||||
BLOCKING_INVOKE_METHOD(this, "activeInputPlugins",
|
||||
Q_RETURN_ARG(QStringList, result));
|
||||
return result;
|
||||
}
|
||||
|
@ -66,7 +66,7 @@ QStringList InputConfiguration::activeInputPlugins() {
|
|||
QString InputConfiguration::configurationLayout(QString pluginName) {
|
||||
if (QThread::currentThread() != thread()) {
|
||||
QString result;
|
||||
hifi::qt::blockingInvokeMethod(this, "configurationLayout",
|
||||
BLOCKING_INVOKE_METHOD(this, "configurationLayout",
|
||||
Q_RETURN_ARG(QString, result),
|
||||
Q_ARG(QString, pluginName));
|
||||
return result;
|
||||
|
@ -83,7 +83,7 @@ QString InputConfiguration::configurationLayout(QString pluginName) {
|
|||
|
||||
void InputConfiguration::setConfigurationSettings(QJsonObject configurationSettings, QString pluginName) {
|
||||
if (QThread::currentThread() != thread()) {
|
||||
hifi::qt::blockingInvokeMethod(this, "setConfigurationSettings",
|
||||
BLOCKING_INVOKE_METHOD(this, "setConfigurationSettings",
|
||||
Q_ARG(QJsonObject, configurationSettings),
|
||||
Q_ARG(QString, pluginName));
|
||||
return;
|
||||
|
@ -99,7 +99,7 @@ void InputConfiguration::setConfigurationSettings(QJsonObject configurationSetti
|
|||
QJsonObject InputConfiguration::configurationSettings(QString pluginName) {
|
||||
if (QThread::currentThread() != thread()) {
|
||||
QJsonObject result;
|
||||
hifi::qt::blockingInvokeMethod(this, "configurationSettings",
|
||||
BLOCKING_INVOKE_METHOD(this, "configurationSettings",
|
||||
Q_RETURN_ARG(QJsonObject, result),
|
||||
Q_ARG(QString, pluginName));
|
||||
return result;
|
||||
|
@ -115,7 +115,7 @@ QJsonObject InputConfiguration::configurationSettings(QString pluginName) {
|
|||
|
||||
void InputConfiguration::calibratePlugin(QString pluginName) {
|
||||
if (QThread::currentThread() != thread()) {
|
||||
hifi::qt::blockingInvokeMethod(this, "calibratePlugin");
|
||||
BLOCKING_INVOKE_METHOD(this, "calibratePlugin");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -130,7 +130,7 @@ void InputConfiguration::calibratePlugin(QString pluginName) {
|
|||
bool InputConfiguration::uncalibratePlugin(QString pluginName) {
|
||||
if (QThread::currentThread() != thread()) {
|
||||
bool result;
|
||||
hifi::qt::blockingInvokeMethod(this, "uncalibratePlugin",
|
||||
BLOCKING_INVOKE_METHOD(this, "uncalibratePlugin",
|
||||
Q_ARG(bool, result));
|
||||
return result;
|
||||
}
|
||||
|
|
|
@ -39,7 +39,7 @@ ClipCache::ClipCache(QObject* parent) :
|
|||
NetworkClipLoaderPointer ClipCache::getClipLoader(const QUrl& url) {
|
||||
if (QThread::currentThread() != thread()) {
|
||||
NetworkClipLoaderPointer result;
|
||||
hifi::qt::blockingInvokeMethod(this, "getClipLoader",
|
||||
BLOCKING_INVOKE_METHOD(this, "getClipLoader",
|
||||
Q_RETURN_ARG(NetworkClipLoaderPointer, result), Q_ARG(const QUrl&, url));
|
||||
return result;
|
||||
}
|
||||
|
|
|
@ -871,7 +871,7 @@ bool Model::getRelativeDefaultJointTranslation(int jointIndex, glm::vec3& transl
|
|||
QStringList Model::getJointNames() const {
|
||||
if (QThread::currentThread() != thread()) {
|
||||
QStringList result;
|
||||
hifi::qt::blockingInvokeMethod(const_cast<Model*>(this), "getJointNames",
|
||||
BLOCKING_INVOKE_METHOD(const_cast<Model*>(this), "getJointNames",
|
||||
Q_RETURN_ARG(QStringList, result));
|
||||
return result;
|
||||
}
|
||||
|
|
|
@ -61,7 +61,7 @@ void TaskConfig::transferChildrenConfigs(QConfigPointer source) {
|
|||
|
||||
void TaskConfig::refresh() {
|
||||
if (QThread::currentThread() != thread()) {
|
||||
hifi::qt::blockingInvokeMethod(this, "refresh");
|
||||
BLOCKING_INVOKE_METHOD(this, "refresh");
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ ScriptAudioInjector* AudioScriptingInterface::playSound(SharedSoundPointer sound
|
|||
if (QThread::currentThread() != thread()) {
|
||||
ScriptAudioInjector* injector = NULL;
|
||||
|
||||
hifi::qt::blockingInvokeMethod(this, "playSound",
|
||||
BLOCKING_INVOKE_METHOD(this, "playSound",
|
||||
Q_RETURN_ARG(ScriptAudioInjector*, injector),
|
||||
Q_ARG(SharedSoundPointer, sound),
|
||||
Q_ARG(const AudioInjectorOptions&, injectorOptions));
|
||||
|
|
|
@ -99,7 +99,7 @@ void RecordingScriptingInterface::loadRecording(const QString& url, QScriptValue
|
|||
|
||||
void RecordingScriptingInterface::startPlaying() {
|
||||
if (QThread::currentThread() != thread()) {
|
||||
hifi::qt::blockingInvokeMethod(this, "startPlaying");
|
||||
BLOCKING_INVOKE_METHOD(this, "startPlaying");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -116,7 +116,7 @@ void RecordingScriptingInterface::setPlayerAudioOffset(float audioOffset) {
|
|||
|
||||
void RecordingScriptingInterface::setPlayerTime(float time) {
|
||||
if (QThread::currentThread() != thread()) {
|
||||
hifi::qt::blockingInvokeMethod(this, "setPlayerTime", Q_ARG(float, time));
|
||||
BLOCKING_INVOKE_METHOD(this, "setPlayerTime", Q_ARG(float, time));
|
||||
return;
|
||||
}
|
||||
_player->seek(time);
|
||||
|
@ -148,7 +148,7 @@ void RecordingScriptingInterface::setPlayerUseSkeletonModel(bool useSkeletonMode
|
|||
|
||||
void RecordingScriptingInterface::pausePlayer() {
|
||||
if (QThread::currentThread() != thread()) {
|
||||
hifi::qt::blockingInvokeMethod(this, "pausePlayer");
|
||||
BLOCKING_INVOKE_METHOD(this, "pausePlayer");
|
||||
return;
|
||||
}
|
||||
_player->pause();
|
||||
|
@ -156,7 +156,7 @@ void RecordingScriptingInterface::pausePlayer() {
|
|||
|
||||
void RecordingScriptingInterface::stopPlaying() {
|
||||
if (QThread::currentThread() != thread()) {
|
||||
hifi::qt::blockingInvokeMethod(this, "stopPlaying");
|
||||
BLOCKING_INVOKE_METHOD(this, "stopPlaying");
|
||||
return;
|
||||
}
|
||||
_player->stop();
|
||||
|
@ -177,7 +177,7 @@ void RecordingScriptingInterface::startRecording() {
|
|||
}
|
||||
|
||||
if (QThread::currentThread() != thread()) {
|
||||
hifi::qt::blockingInvokeMethod(this, "startRecording");
|
||||
BLOCKING_INVOKE_METHOD(this, "startRecording");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -200,7 +200,7 @@ QString RecordingScriptingInterface::getDefaultRecordingSaveDirectory() {
|
|||
|
||||
void RecordingScriptingInterface::saveRecording(const QString& filename) {
|
||||
if (QThread::currentThread() != thread()) {
|
||||
hifi::qt::blockingInvokeMethod(this, "saveRecording",
|
||||
BLOCKING_INVOKE_METHOD(this, "saveRecording",
|
||||
Q_ARG(QString, filename));
|
||||
return;
|
||||
}
|
||||
|
@ -221,7 +221,7 @@ bool RecordingScriptingInterface::saveRecordingToAsset(QScriptValue getClipAtpUr
|
|||
|
||||
if (QThread::currentThread() != thread()) {
|
||||
bool result;
|
||||
hifi::qt::blockingInvokeMethod(this, "saveRecordingToAsset",
|
||||
BLOCKING_INVOKE_METHOD(this, "saveRecordingToAsset",
|
||||
Q_RETURN_ARG(bool, result),
|
||||
Q_ARG(QScriptValue, getClipAtpUrl));
|
||||
return result;
|
||||
|
@ -258,7 +258,7 @@ bool RecordingScriptingInterface::saveRecordingToAsset(QScriptValue getClipAtpUr
|
|||
|
||||
void RecordingScriptingInterface::loadLastRecording() {
|
||||
if (QThread::currentThread() != thread()) {
|
||||
hifi::qt::blockingInvokeMethod(this, "loadLastRecording");
|
||||
BLOCKING_INVOKE_METHOD(this, "loadLastRecording");
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -965,7 +965,7 @@ QScriptValue ScriptEngine::evaluate(const QString& sourceCode, const QString& fi
|
|||
qCDebug(scriptengine) << "*** WARNING *** ScriptEngine::evaluate() called on wrong thread [" << QThread::currentThread() << "], invoking on correct thread [" << thread() << "] "
|
||||
"sourceCode:" << sourceCode << " fileName:" << fileName << "lineNumber:" << lineNumber;
|
||||
#endif
|
||||
hifi::qt::blockingInvokeMethod(this, "evaluate",
|
||||
BLOCKING_INVOKE_METHOD(this, "evaluate",
|
||||
Q_RETURN_ARG(QScriptValue, result),
|
||||
Q_ARG(const QString&, sourceCode),
|
||||
Q_ARG(const QString&, fileName),
|
||||
|
|
|
@ -453,7 +453,7 @@ ScriptEngine* ScriptEngines::loadScript(const QUrl& scriptFilename, bool isUserL
|
|||
bool activateMainWindow, bool reload) {
|
||||
if (thread() != QThread::currentThread()) {
|
||||
ScriptEngine* result { nullptr };
|
||||
hifi::qt::blockingInvokeMethod(this, "loadScript", Q_RETURN_ARG(ScriptEngine*, result),
|
||||
BLOCKING_INVOKE_METHOD(this, "loadScript", Q_RETURN_ARG(ScriptEngine*, result),
|
||||
Q_ARG(QUrl, scriptFilename),
|
||||
Q_ARG(bool, isUserLoaded),
|
||||
Q_ARG(bool, loadScriptFromEditor),
|
||||
|
|
|
@ -17,6 +17,7 @@ Q_LOGGING_CATEGORY(thread_safety, "hifi.thread_safety")
|
|||
namespace hifi { namespace qt {
|
||||
|
||||
bool blockingInvokeMethod(
|
||||
const char* function,
|
||||
QObject *obj, const char *member,
|
||||
QGenericReturnArgument ret,
|
||||
QGenericArgument val0,
|
||||
|
@ -30,13 +31,14 @@ bool blockingInvokeMethod(
|
|||
QGenericArgument val8,
|
||||
QGenericArgument val9) {
|
||||
if (QThread::currentThread() == qApp->thread()) {
|
||||
qCWarning(thread_safety, "BlockingQueuedConnection invoked on main thread!");
|
||||
qCWarning(thread_safety) << "BlockingQueuedConnection invoked on main thread from " << function;
|
||||
}
|
||||
return QMetaObject::invokeMethod(obj, member,
|
||||
Qt::BlockingQueuedConnection, ret, val0, val1, val2, val3, val4, val5, val6, val7, val8, val9);
|
||||
}
|
||||
|
||||
bool blockingInvokeMethod(
|
||||
const char* function,
|
||||
QObject *obj, const char *member,
|
||||
QGenericArgument val0,
|
||||
QGenericArgument val1,
|
||||
|
@ -48,8 +50,7 @@ bool blockingInvokeMethod(
|
|||
QGenericArgument val7,
|
||||
QGenericArgument val8,
|
||||
QGenericArgument val9) {
|
||||
qCWarning(thread_safety, "BlockingQueuedConnection invoked without return value!");
|
||||
return blockingInvokeMethod(obj, member, QGenericReturnArgument(), val0, val1, val2, val3, val4, val5, val6, val7, val8, val9);
|
||||
return blockingInvokeMethod(function, obj, member, QGenericReturnArgument(), val0, val1, val2, val3, val4, val5, val6, val7, val8, val9);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -12,9 +12,11 @@
|
|||
|
||||
#include <QtCore/QObject>
|
||||
|
||||
|
||||
namespace hifi { namespace qt {
|
||||
|
||||
bool blockingInvokeMethod(
|
||||
const char* function,
|
||||
QObject *obj, const char *member,
|
||||
QGenericReturnArgument ret,
|
||||
QGenericArgument val0 = QGenericArgument(Q_NULLPTR),
|
||||
|
@ -29,6 +31,7 @@ bool blockingInvokeMethod(
|
|||
QGenericArgument val9 = QGenericArgument());
|
||||
|
||||
bool blockingInvokeMethod(
|
||||
const char* function,
|
||||
QObject *obj, const char *member,
|
||||
QGenericArgument val0 = QGenericArgument(Q_NULLPTR),
|
||||
QGenericArgument val1 = QGenericArgument(),
|
||||
|
@ -43,5 +46,7 @@ bool blockingInvokeMethod(
|
|||
|
||||
} }
|
||||
|
||||
#define BLOCKING_INVOKE_METHOD(obj, member, ...) \
|
||||
hifi::qt::blockingInvokeMethod(__FUNCTION__, obj, member, ##__VA_ARGS__)
|
||||
|
||||
#endif
|
||||
|
|
|
@ -250,7 +250,7 @@ int OffscreenUi::waitForMessageBoxResult(QQuickItem* messageBox) {
|
|||
QMessageBox::StandardButton OffscreenUi::messageBox(Icon icon, const QString& title, const QString& text, QMessageBox::StandardButtons buttons, QMessageBox::StandardButton defaultButton) {
|
||||
if (QThread::currentThread() != thread()) {
|
||||
QMessageBox::StandardButton result = QMessageBox::StandardButton::NoButton;
|
||||
hifi::qt::blockingInvokeMethod(this, "messageBox",
|
||||
BLOCKING_INVOKE_METHOD(this, "messageBox",
|
||||
Q_RETURN_ARG(QMessageBox::StandardButton, result),
|
||||
Q_ARG(Icon, icon),
|
||||
Q_ARG(QString, title),
|
||||
|
@ -352,7 +352,7 @@ QVariant OffscreenUi::getCustomInfo(const Icon icon, const QString& title, const
|
|||
QVariant OffscreenUi::inputDialog(const Icon icon, const QString& title, const QString& label, const QVariant& current) {
|
||||
if (QThread::currentThread() != thread()) {
|
||||
QVariant result;
|
||||
hifi::qt::blockingInvokeMethod(this, "inputDialog",
|
||||
BLOCKING_INVOKE_METHOD(this, "inputDialog",
|
||||
Q_RETURN_ARG(QVariant, result),
|
||||
Q_ARG(Icon, icon),
|
||||
Q_ARG(QString, title),
|
||||
|
@ -367,7 +367,7 @@ QVariant OffscreenUi::inputDialog(const Icon icon, const QString& title, const Q
|
|||
QVariant OffscreenUi::customInputDialog(const Icon icon, const QString& title, const QVariantMap& config) {
|
||||
if (QThread::currentThread() != thread()) {
|
||||
QVariant result;
|
||||
hifi::qt::blockingInvokeMethod(this, "customInputDialog",
|
||||
BLOCKING_INVOKE_METHOD(this, "customInputDialog",
|
||||
Q_RETURN_ARG(QVariant, result),
|
||||
Q_ARG(Icon, icon),
|
||||
Q_ARG(QString, title),
|
||||
|
@ -641,7 +641,7 @@ QString OffscreenUi::fileDialog(const QVariantMap& properties) {
|
|||
QString OffscreenUi::fileOpenDialog(const QString& caption, const QString& dir, const QString& filter, QString* selectedFilter, QFileDialog::Options options) {
|
||||
if (QThread::currentThread() != thread()) {
|
||||
QString result;
|
||||
hifi::qt::blockingInvokeMethod(this, "fileOpenDialog",
|
||||
BLOCKING_INVOKE_METHOD(this, "fileOpenDialog",
|
||||
Q_RETURN_ARG(QString, result),
|
||||
Q_ARG(QString, caption),
|
||||
Q_ARG(QString, dir),
|
||||
|
@ -663,7 +663,7 @@ QString OffscreenUi::fileOpenDialog(const QString& caption, const QString& dir,
|
|||
QString OffscreenUi::fileSaveDialog(const QString& caption, const QString& dir, const QString& filter, QString* selectedFilter, QFileDialog::Options options) {
|
||||
if (QThread::currentThread() != thread()) {
|
||||
QString result;
|
||||
hifi::qt::blockingInvokeMethod(this, "fileSaveDialog",
|
||||
BLOCKING_INVOKE_METHOD(this, "fileSaveDialog",
|
||||
Q_RETURN_ARG(QString, result),
|
||||
Q_ARG(QString, caption),
|
||||
Q_ARG(QString, dir),
|
||||
|
@ -687,7 +687,7 @@ QString OffscreenUi::fileSaveDialog(const QString& caption, const QString& dir,
|
|||
QString OffscreenUi::existingDirectoryDialog(const QString& caption, const QString& dir, const QString& filter, QString* selectedFilter, QFileDialog::Options options) {
|
||||
if (QThread::currentThread() != thread()) {
|
||||
QString result;
|
||||
hifi::qt::blockingInvokeMethod(this, "existingDirectoryDialog",
|
||||
BLOCKING_INVOKE_METHOD(this, "existingDirectoryDialog",
|
||||
Q_RETURN_ARG(QString, result),
|
||||
Q_ARG(QString, caption),
|
||||
Q_ARG(QString, dir),
|
||||
|
@ -774,7 +774,7 @@ QString OffscreenUi::assetOpenDialog(const QString& caption, const QString& dir,
|
|||
// ATP equivalent of fileOpenDialog().
|
||||
if (QThread::currentThread() != thread()) {
|
||||
QString result;
|
||||
hifi::qt::blockingInvokeMethod(this, "assetOpenDialog",
|
||||
BLOCKING_INVOKE_METHOD(this, "assetOpenDialog",
|
||||
Q_RETURN_ARG(QString, result),
|
||||
Q_ARG(QString, caption),
|
||||
Q_ARG(QString, dir),
|
||||
|
|
|
@ -38,7 +38,7 @@ QScriptValue QmlWebWindowClass::constructor(QScriptContext* context, QScriptEngi
|
|||
QString QmlWebWindowClass::getURL() {
|
||||
if (QThread::currentThread() != thread()) {
|
||||
QString result;
|
||||
hifi::qt::blockingInvokeMethod(this, "getURL", Q_RETURN_ARG(QString, result));
|
||||
BLOCKING_INVOKE_METHOD(this, "getURL", Q_RETURN_ARG(QString, result));
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
|
@ -79,7 +79,7 @@ QScriptValue QmlWindowClass::constructor(QScriptContext* context, QScriptEngine*
|
|||
Q_ASSERT(retVal);
|
||||
if (QThread::currentThread() != qApp->thread()) {
|
||||
retVal->moveToThread(qApp->thread());
|
||||
hifi::qt::blockingInvokeMethod(retVal, "initQml", Q_ARG(QVariantMap, properties));
|
||||
BLOCKING_INVOKE_METHOD(retVal, "initQml", Q_ARG(QVariantMap, properties));
|
||||
} else {
|
||||
retVal->initQml(properties);
|
||||
}
|
||||
|
@ -111,7 +111,7 @@ void QmlWindowClass::initQml(QVariantMap properties) {
|
|||
// Build the event bridge and wrapper on the main thread
|
||||
offscreenUi->loadInNewContext(qmlSource(), [&](QQmlContext* context, QObject* object) {
|
||||
_qmlWindow = object;
|
||||
context->setContextProperty("eventBridge", this);
|
||||
context->setContextProperty(EVENT_BRIDGE_PROPERTY, this);
|
||||
context->engine()->setObjectOwnership(this, QQmlEngine::CppOwnership);
|
||||
context->engine()->setObjectOwnership(object, QQmlEngine::CppOwnership);
|
||||
if (properties.contains(TITLE_PROPERTY)) {
|
||||
|
@ -243,7 +243,7 @@ void QmlWindowClass::setVisible(bool visible) {
|
|||
bool QmlWindowClass::isVisible() {
|
||||
if (QThread::currentThread() != thread()) {
|
||||
bool result = false;
|
||||
hifi::qt::blockingInvokeMethod(this, "isVisible", Q_RETURN_ARG(bool, result));
|
||||
BLOCKING_INVOKE_METHOD(this, "isVisible", Q_RETURN_ARG(bool, result));
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -264,7 +264,7 @@ bool QmlWindowClass::isVisible() {
|
|||
glm::vec2 QmlWindowClass::getPosition() {
|
||||
if (QThread::currentThread() != thread()) {
|
||||
vec2 result;
|
||||
hifi::qt::blockingInvokeMethod(this, "getPosition", Q_RETURN_ARG(vec2, result));
|
||||
BLOCKING_INVOKE_METHOD(this, "getPosition", Q_RETURN_ARG(vec2, result));
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -299,7 +299,7 @@ glm::vec2 toGlm(const QSizeF& size) {
|
|||
glm::vec2 QmlWindowClass::getSize() {
|
||||
if (QThread::currentThread() != thread()) {
|
||||
vec2 result;
|
||||
hifi::qt::blockingInvokeMethod(this, "getSize", Q_RETURN_ARG(vec2, result));
|
||||
BLOCKING_INVOKE_METHOD(this, "getSize", Q_RETURN_ARG(vec2, result));
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
|
@ -246,7 +246,7 @@ void Menu::removeAction(MenuWrapper* menu, const QString& actionName) {
|
|||
|
||||
void Menu::setIsOptionChecked(const QString& menuOption, bool isChecked) {
|
||||
if (thread() != QThread::currentThread()) {
|
||||
hifi::qt::blockingInvokeMethod(this, "setIsOptionChecked",
|
||||
BLOCKING_INVOKE_METHOD(this, "setIsOptionChecked",
|
||||
Q_ARG(const QString&, menuOption),
|
||||
Q_ARG(bool, isChecked));
|
||||
return;
|
||||
|
|
|
@ -38,7 +38,7 @@ void QmlWrapper::writeProperties(QVariant propertyMap) {
|
|||
QVariant QmlWrapper::readProperty(const QString& propertyName) {
|
||||
if (QThread::currentThread() != thread()) {
|
||||
QVariant result;
|
||||
hifi::qt::blockingInvokeMethod(this, "readProperty", Q_RETURN_ARG(QVariant, result), Q_ARG(QString, propertyName));
|
||||
BLOCKING_INVOKE_METHOD(this, "readProperty", Q_RETURN_ARG(QVariant, result), Q_ARG(QString, propertyName));
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -48,7 +48,7 @@ QVariant QmlWrapper::readProperty(const QString& propertyName) {
|
|||
QVariant QmlWrapper::readProperties(const QVariant& propertyList) {
|
||||
if (QThread::currentThread() != thread()) {
|
||||
QVariant result;
|
||||
hifi::qt::blockingInvokeMethod(this, "readProperties", Q_RETURN_ARG(QVariant, result), Q_ARG(QVariant, propertyList));
|
||||
BLOCKING_INVOKE_METHOD(this, "readProperties", Q_RETURN_ARG(QVariant, result), Q_ARG(QVariant, propertyList));
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@ ToolbarProxy* TabletScriptingInterface::getSystemToolbarProxy() {
|
|||
TabletProxy* TabletScriptingInterface::getTablet(const QString& tabletId) {
|
||||
TabletProxy* tabletProxy = nullptr;
|
||||
if (QThread::currentThread() != thread()) {
|
||||
hifi::qt::blockingInvokeMethod(this, "getTablet", Q_RETURN_ARG(TabletProxy*, tabletProxy), Q_ARG(QString, tabletId));
|
||||
BLOCKING_INVOKE_METHOD(this, "getTablet", Q_RETURN_ARG(TabletProxy*, tabletProxy), Q_ARG(QString, tabletId));
|
||||
return tabletProxy;
|
||||
}
|
||||
|
||||
|
@ -291,7 +291,7 @@ void TabletProxy::initialScreen(const QVariant& url) {
|
|||
bool TabletProxy::isMessageDialogOpen() {
|
||||
if (QThread::currentThread() != thread()) {
|
||||
bool result = false;
|
||||
hifi::qt::blockingInvokeMethod(this, "isMessageDialogOpen", Q_RETURN_ARG(bool, result));
|
||||
BLOCKING_INVOKE_METHOD(this, "isMessageDialogOpen", Q_RETURN_ARG(bool, result));
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -316,7 +316,7 @@ void TabletProxy::emitWebEvent(const QVariant& msg) {
|
|||
bool TabletProxy::isPathLoaded(const QVariant& path) {
|
||||
if (QThread::currentThread() != thread()) {
|
||||
bool result = false;
|
||||
hifi::qt::blockingInvokeMethod(this, "isPathLoaded", Q_RETURN_ARG(bool, result), Q_ARG(QVariant, path));
|
||||
BLOCKING_INVOKE_METHOD(this, "isPathLoaded", Q_RETURN_ARG(bool, result), Q_ARG(QVariant, path));
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -479,7 +479,7 @@ void TabletProxy::loadQMLSource(const QVariant& path) {
|
|||
bool TabletProxy::pushOntoStack(const QVariant& path) {
|
||||
if (QThread::currentThread() != thread()) {
|
||||
bool result = false;
|
||||
hifi::qt::blockingInvokeMethod(this, "pushOntoStack", Q_RETURN_ARG(bool, result), Q_ARG(QVariant, path));
|
||||
BLOCKING_INVOKE_METHOD(this, "pushOntoStack", Q_RETURN_ARG(bool, result), Q_ARG(QVariant, path));
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -605,7 +605,7 @@ void TabletProxy::gotoWebScreen(const QString& url, const QString& injectedJavaS
|
|||
TabletButtonProxy* TabletProxy::addButton(const QVariant& properties) {
|
||||
if (QThread::currentThread() != thread()) {
|
||||
TabletButtonProxy* result = nullptr;
|
||||
hifi::qt::blockingInvokeMethod(this, "addButton", Q_RETURN_ARG(TabletButtonProxy*, result), Q_ARG(QVariant, properties));
|
||||
BLOCKING_INVOKE_METHOD(this, "addButton", Q_RETURN_ARG(TabletButtonProxy*, result), Q_ARG(QVariant, properties));
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -632,7 +632,7 @@ TabletButtonProxy* TabletProxy::addButton(const QVariant& properties) {
|
|||
bool TabletProxy::onHomeScreen() {
|
||||
if (QThread::currentThread() != thread()) {
|
||||
bool result = false;
|
||||
hifi::qt::blockingInvokeMethod(this, "onHomeScreen", Q_RETURN_ARG(bool, result));
|
||||
BLOCKING_INVOKE_METHOD(this, "onHomeScreen", Q_RETURN_ARG(bool, result));
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -839,7 +839,7 @@ void TabletButtonProxy::setToolbarButtonProxy(QObject* toolbarButtonProxy) {
|
|||
QVariantMap TabletButtonProxy::getProperties() {
|
||||
if (QThread::currentThread() != thread()) {
|
||||
QVariantMap result;
|
||||
hifi::qt::blockingInvokeMethod(this, "getProperties", Q_RETURN_ARG(QVariantMap, result));
|
||||
BLOCKING_INVOKE_METHOD(this, "getProperties", Q_RETURN_ARG(QVariantMap, result));
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
|
@ -70,7 +70,7 @@ ToolbarProxy::ToolbarProxy(QObject* qmlObject, QObject* parent) : QmlWrapper(qml
|
|||
ToolbarButtonProxy* ToolbarProxy::addButton(const QVariant& properties) {
|
||||
if (QThread::currentThread() != thread()) {
|
||||
ToolbarButtonProxy* result = nullptr;
|
||||
hifi::qt::blockingInvokeMethod(this, "addButton", Q_RETURN_ARG(ToolbarButtonProxy*, result), Q_ARG(QVariant, properties));
|
||||
BLOCKING_INVOKE_METHOD(this, "addButton", Q_RETURN_ARG(ToolbarButtonProxy*, result), Q_ARG(QVariant, properties));
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -101,7 +101,7 @@ void ToolbarProxy::removeButton(const QVariant& name) {
|
|||
ToolbarProxy* ToolbarScriptingInterface::getToolbar(const QString& toolbarId) {
|
||||
if (QThread::currentThread() != thread()) {
|
||||
ToolbarProxy* result = nullptr;
|
||||
hifi::qt::blockingInvokeMethod(this, "getToolbar", Q_RETURN_ARG(ToolbarProxy*, result), Q_ARG(QString, toolbarId));
|
||||
BLOCKING_INVOKE_METHOD(this, "getToolbar", Q_RETURN_ARG(ToolbarProxy*, result), Q_ARG(QString, toolbarId));
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue