Showing the changes to interface/src/scripting/ClipboardScriptingInterface.cpp (1 of 45 files). Show all
Unified · Split
| @@ -8,9 +8,12 @@ · 7 unmodified lines | |||
| 8 | // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html | 8 | // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html |
| 9 | // | 9 | // |
| 10 | 10 | ||
| 11 | #include "Application.h" | ||
| 12 | #include "ClipboardScriptingInterface.h" | 11 | #include "ClipboardScriptingInterface.h" |
| 13 | 12 | ||
| 13 | #include <shared/QtHelpers.h> | ||
| 14 | |||
| 15 | #include "Application.h" | ||
| 16 | |||
| 14 | ClipboardScriptingInterface::ClipboardScriptingInterface() { | 17 | ClipboardScriptingInterface::ClipboardScriptingInterface() { |
| 15 | } | 18 | } |
| 16 | 19 | ||
| @@ -24,7 +27,7 @@ float ClipboardScriptingInterface::getClipboardContentsLargestDimension() { · 7 unmodified lines | |||
| 24 | 27 | ||
| 25 | bool ClipboardScriptingInterface::exportEntities(const QString& filename, const QVector<EntityItemID>& entityIDs) { | 28 | bool ClipboardScriptingInterface::exportEntities(const QString& filename, const QVector<EntityItemID>& entityIDs) { |
| 26 | bool retVal; | 29 | bool retVal; |
| 27 | QMetaObject::invokeMethod(qApp, "exportEntities", Qt::BlockingQueuedConnection, | 30 | hifi::qt::blockingInvokeMethod(qApp, "exportEntities", |
| 28 | Q_RETURN_ARG(bool, retVal), | 31 | Q_RETURN_ARG(bool, retVal), |
| 29 | Q_ARG(const QString&, filename), | 32 | Q_ARG(const QString&, filename), |
| 30 | Q_ARG(const QVector<EntityItemID>&, entityIDs)); | 33 | Q_ARG(const QVector<EntityItemID>&, entityIDs)); |
| @@ -33,7 +36,7 @@ bool ClipboardScriptingInterface::exportEntities(const QString& filename, const · 2 unmodified lines | |||
| 33 | 36 | ||
| 34 | bool ClipboardScriptingInterface::exportEntities(const QString& filename, float x, float y, float z, float s) { | 37 | bool ClipboardScriptingInterface::exportEntities(const QString& filename, float x, float y, float z, float s) { |
| 35 | bool retVal; | 38 | bool retVal; |
| 36 | QMetaObject::invokeMethod(qApp, "exportEntities", Qt::BlockingQueuedConnection, | 39 | hifi::qt::blockingInvokeMethod(qApp, "exportEntities", |
| 37 | Q_RETURN_ARG(bool, retVal), | 40 | Q_RETURN_ARG(bool, retVal), |
| 38 | Q_ARG(const QString&, filename), | 41 | Q_ARG(const QString&, filename), |
| 39 | Q_ARG(float, x), | 42 | Q_ARG(float, x), |
| @@ -45,7 +48,7 @@ bool ClipboardScriptingInterface::exportEntities(const QString& filename, float · 5 unmodified lines | |||
| 45 | 48 | ||
| 46 | bool ClipboardScriptingInterface::importEntities(const QString& filename) { | 49 | bool ClipboardScriptingInterface::importEntities(const QString& filename) { |
| 47 | bool retVal; | 50 | bool retVal; |
| 48 | QMetaObject::invokeMethod(qApp, "importEntities", Qt::BlockingQueuedConnection, | 51 | hifi::qt::blockingInvokeMethod(qApp, "importEntities", |
| 49 | Q_RETURN_ARG(bool, retVal), | 52 | Q_RETURN_ARG(bool, retVal), |
| 50 | Q_ARG(const QString&, filename)); | 53 | Q_ARG(const QString&, filename)); |
| 51 | return retVal; | 54 | return retVal; |
| @@ -53,7 +56,7 @@ bool ClipboardScriptingInterface::importEntities(const QString& filename) { · 1 unmodified line | |||
| 53 | 56 | ||
| 54 | QVector<EntityItemID> ClipboardScriptingInterface::pasteEntities(glm::vec3 position) { | 57 | QVector<EntityItemID> ClipboardScriptingInterface::pasteEntities(glm::vec3 position) { |
| 55 | QVector<EntityItemID> retVal; | 58 | QVector<EntityItemID> retVal; |
| 56 | QMetaObject::invokeMethod(qApp, "pasteEntities", Qt::BlockingQueuedConnection, | 59 | hifi::qt::blockingInvokeMethod(qApp, "pasteEntities", |
| 57 | Q_RETURN_ARG(QVector<EntityItemID>, retVal), | 60 | Q_RETURN_ARG(QVector<EntityItemID>, retVal), |
| 58 | Q_ARG(float, position.x), | 61 | Q_ARG(float, position.x), |
| 59 | Q_ARG(float, position.y), | 62 | Q_ARG(float, position.y), |