Showing the changes to libraries/script-engine/src/RecordingScriptingInterface.cpp (1 of 45 files). Show all
Unified · Split
| @@ -14,6 +14,7 @@ · 13 unmodified lines | |||
| 14 | #include <QtScript/QScriptValue> | 14 | #include <QtScript/QScriptValue> |
| 15 | #include <QtWidgets/QFileDialog> | 15 | #include <QtWidgets/QFileDialog> |
| 16 | 16 | ||
| 17 | #include <shared/QtHelpers.h> | ||
| 17 | #include <AssetClient.h> | 18 | #include <AssetClient.h> |
| 18 | #include <AssetUpload.h> | 19 | #include <AssetUpload.h> |
| 19 | #include <BuildInfo.h> | 20 | #include <BuildInfo.h> |
| @@ -98,7 +99,7 @@ void RecordingScriptingInterface::loadRecording(const QString& url, QScriptValue · 78 unmodified lines | |||
| 98 | 99 | ||
| 99 | void RecordingScriptingInterface::startPlaying() { | 100 | void RecordingScriptingInterface::startPlaying() { |
| 100 | if (QThread::currentThread() != thread()) { | 101 | if (QThread::currentThread() != thread()) { |
| 101 | QMetaObject::invokeMethod(this, "startPlaying", Qt::BlockingQueuedConnection); | 102 | hifi::qt::blockingInvokeMethod(this, "startPlaying"); |
| 102 | return; | 103 | return; |
| 103 | } | 104 | } |
| 104 | 105 | ||
| @@ -115,7 +116,7 @@ void RecordingScriptingInterface::setPlayerAudioOffset(float audioOffset) { · 10 unmodified lines | |||
| 115 | 116 | ||
| 116 | void RecordingScriptingInterface::setPlayerTime(float time) { | 117 | void RecordingScriptingInterface::setPlayerTime(float time) { |
| 117 | if (QThread::currentThread() != thread()) { | 118 | if (QThread::currentThread() != thread()) { |
| 118 | QMetaObject::invokeMethod(this, "setPlayerTime", Qt::BlockingQueuedConnection, Q_ARG(float, time)); | 119 | hifi::qt::blockingInvokeMethod(this, "setPlayerTime", Q_ARG(float, time)); |
| 119 | return; | 120 | return; |
| 120 | } | 121 | } |
| 121 | _player->seek(time); | 122 | _player->seek(time); |
| @@ -147,7 +148,7 @@ void RecordingScriptingInterface::setPlayerUseSkeletonModel(bool useSkeletonMode · 25 unmodified lines | |||
| 147 | 148 | ||
| 148 | void RecordingScriptingInterface::pausePlayer() { | 149 | void RecordingScriptingInterface::pausePlayer() { |
| 149 | if (QThread::currentThread() != thread()) { | 150 | if (QThread::currentThread() != thread()) { |
| 150 | QMetaObject::invokeMethod(this, "pausePlayer", Qt::BlockingQueuedConnection); | 151 | hifi::qt::blockingInvokeMethod(this, "pausePlayer"); |
| 151 | return; | 152 | return; |
| 152 | } | 153 | } |
| 153 | _player->pause(); | 154 | _player->pause(); |
| @@ -155,7 +156,7 @@ void RecordingScriptingInterface::pausePlayer() { · 1 unmodified line | |||
| 155 | 156 | ||
| 156 | void RecordingScriptingInterface::stopPlaying() { | 157 | void RecordingScriptingInterface::stopPlaying() { |
| 157 | if (QThread::currentThread() != thread()) { | 158 | if (QThread::currentThread() != thread()) { |
| 158 | QMetaObject::invokeMethod(this, "stopPlaying", Qt::BlockingQueuedConnection); | 159 | hifi::qt::blockingInvokeMethod(this, "stopPlaying"); |
| 159 | return; | 160 | return; |
| 160 | } | 161 | } |
| 161 | _player->stop(); | 162 | _player->stop(); |
| @@ -176,7 +177,7 @@ void RecordingScriptingInterface::startRecording() { · 14 unmodified lines | |||
| 176 | } | 177 | } |
| 177 | 178 | ||
| 178 | if (QThread::currentThread() != thread()) { | 179 | if (QThread::currentThread() != thread()) { |
| 179 | QMetaObject::invokeMethod(this, "startRecording", Qt::BlockingQueuedConnection); | 180 | hifi::qt::blockingInvokeMethod(this, "startRecording"); |
| 180 | return; | 181 | return; |
| 181 | } | 182 | } |
| 182 | 183 | ||
| @@ -199,7 +200,7 @@ QString RecordingScriptingInterface::getDefaultRecordingSaveDirectory() { · 16 unmodified lines | |||
| 199 | 200 | ||
| 200 | void RecordingScriptingInterface::saveRecording(const QString& filename) { | 201 | void RecordingScriptingInterface::saveRecording(const QString& filename) { |
| 201 | if (QThread::currentThread() != thread()) { | 202 | if (QThread::currentThread() != thread()) { |
| 202 | QMetaObject::invokeMethod(this, "saveRecording", Qt::BlockingQueuedConnection, | 203 | hifi::qt::blockingInvokeMethod(this, "saveRecording", |
| 203 | Q_ARG(QString, filename)); | 204 | Q_ARG(QString, filename)); |
| 204 | return; | 205 | return; |
| 205 | } | 206 | } |
| @@ -220,7 +221,7 @@ bool RecordingScriptingInterface::saveRecordingToAsset(QScriptValue getClipAtpUr · 14 unmodified lines | |||
| 220 | 221 | ||
| 221 | if (QThread::currentThread() != thread()) { | 222 | if (QThread::currentThread() != thread()) { |
| 222 | bool result; | 223 | bool result; |
| 223 | QMetaObject::invokeMethod(this, "saveRecordingToAsset", Qt::BlockingQueuedConnection, | 224 | hifi::qt::blockingInvokeMethod(this, "saveRecordingToAsset", |
| 224 | Q_RETURN_ARG(bool, result), | 225 | Q_RETURN_ARG(bool, result), |
| 225 | Q_ARG(QScriptValue, getClipAtpUrl)); | 226 | Q_ARG(QScriptValue, getClipAtpUrl)); |
| 226 | return result; | 227 | return result; |
| @@ -257,7 +258,7 @@ bool RecordingScriptingInterface::saveRecordingToAsset(QScriptValue getClipAtpUr · 30 unmodified lines | |||
| 257 | 258 | ||
| 258 | void RecordingScriptingInterface::loadLastRecording() { | 259 | void RecordingScriptingInterface::loadLastRecording() { |
| 259 | if (QThread::currentThread() != thread()) { | 260 | if (QThread::currentThread() != thread()) { |
| 260 | QMetaObject::invokeMethod(this, "loadLastRecording", Qt::BlockingQueuedConnection); | 261 | hifi::qt::blockingInvokeMethod(this, "loadLastRecording"); |
| 261 | return; | 262 | return; |
| 262 | } | 263 | } |
| 263 | 264 | ||