Showing the changes to interface/src/scripting/WindowScriptingInterface.cpp (1 of 370 files). Show all
Unified · Split
| @@ -78,7 +78,7 @@ WindowScriptingInterface::~WindowScriptingInterface() { · 77 unmodified lines | ||
| 78 | 78 | } |
| 79 | 79 | |
| 80 | 80 | ScriptValue WindowScriptingInterface::hasFocus() { |
| 81 | − Q_ASSERT(engine); | |
| 81 | + Q_ASSERT(engine()); | |
| 82 | 82 | return engine()->newValue(qApp->hasFocus()); |
| 83 | 83 | } |
| 84 | 84 | |
| @@ -107,7 +107,7 @@ void WindowScriptingInterface::alert(const QString& message) { · 22 unmodified lines | ||
| 107 | 107 | /// \param const QString& message message to display |
| 108 | 108 | /// \return ScriptValue `true` if 'Yes' was clicked, `false` otherwise |
| 109 | 109 | ScriptValue WindowScriptingInterface::confirm(const QString& message) { |
| 110 | − Q_ASSERT(engine); | |
| 110 | + Q_ASSERT(engine()); | |
| 111 | 111 | return engine()->newValue((QMessageBox::Yes == OffscreenUi::question("", message, QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes))); |
| 112 | 112 | } |
| 113 | 113 | |
| @@ -117,7 +117,7 @@ ScriptValue WindowScriptingInterface::confirm(const QString& message) { · 3 unmodified lines | ||
| 117 | 117 | /// \return ScriptValue string text value in text box if the dialog was accepted, `null` otherwise. |
| 118 | 118 | ScriptValue WindowScriptingInterface::prompt(const QString& message, const QString& defaultText) { |
| 119 | 119 | QString result = OffscreenUi::getText(nullptr, "", message, QLineEdit::Normal, defaultText); |
| 120 | − Q_ASSERT(engine); | |
| 120 | + Q_ASSERT(engine()); | |
| 121 | 121 | auto sResult = engine()->newValue(result); |
| 122 | 122 | if (sResult.equals(engine()->newValue(""))) { |
| 123 | 123 | return engine()->nullValue(); |
| @@ -234,7 +234,7 @@ ScriptValue WindowScriptingInterface::browseDir(const QString& title, const QStr · 110 unmodified lines | ||
| 234 | 234 | if (!result.isEmpty()) { |
| 235 | 235 | setPreviousBrowseLocation(QFileInfo(result).absolutePath()); |
| 236 | 236 | } |
| 237 | − Q_ASSERT(engine); | |
| 237 | + Q_ASSERT(engine()); | |
| 238 | 238 | return result.isEmpty() ? engine()->nullValue() : engine()->newValue(result); |
| 239 | 239 | } |
| 240 | 240 | |
| @@ -279,7 +279,7 @@ ScriptValue WindowScriptingInterface::browse(const QString& title, const QString · 38 unmodified lines | ||
| 279 | 279 | if (!result.isEmpty()) { |
| 280 | 280 | setPreviousBrowseLocation(QFileInfo(result).absolutePath()); |
| 281 | 281 | } |
| 282 | − Q_ASSERT(engine); | |
| 282 | + Q_ASSERT(engine()); | |
| 283 | 283 | return result.isEmpty() ? engine()->nullValue() : engine()->newValue(result); |
| 284 | 284 | } |
| 285 | 285 | |
| @@ -327,7 +327,7 @@ ScriptValue WindowScriptingInterface::save(const QString& title, const QString& · 41 unmodified lines | ||
| 327 | 327 | if (!result.isEmpty()) { |
| 328 | 328 | setPreviousBrowseLocation(QFileInfo(result).absolutePath()); |
| 329 | 329 | } |
| 330 | − Q_ASSERT(engine); | |
| 330 | + Q_ASSERT(engine()); | |
| 331 | 331 | return result.isEmpty() ? engine()->nullValue() : engine()->newValue(result); |
| 332 | 332 | } |
| 333 | 333 | |
| @@ -378,7 +378,7 @@ ScriptValue WindowScriptingInterface::browseAssets(const QString& title, const Q · 44 unmodified lines | ||
| 378 | 378 | if (!result.isEmpty()) { |
| 379 | 379 | setPreviousBrowseAssetLocation(QFileInfo(result).absolutePath()); |
| 380 | 380 | } |
| 381 | − Q_ASSERT(engine); | |
| 381 | + Q_ASSERT(engine()); | |
| 382 | 382 | return result.isEmpty() ? engine()->nullValue() : engine()->newValue(result); |
| 383 | 383 | } |
| 384 | 384 | |