Showing the changes to interface/src/ui/JSConsole.cpp (1 of 8 files). Show all
Unified · Split
| @@ -350,12 +350,12 @@ void JSConsole::executeCommand(const QString& command) { · 349 unmodified lines | ||
| 350 | 350 | |
| 351 | 351 | std::weak_ptr<ScriptManager> weakScriptManager = _scriptManager; |
| 352 | 352 | auto consoleFileName = _consoleFileName; |
| 353 | − QFuture<QVariant> future = QtConcurrent::run([weakScriptManager, consoleFileName, command]() -> QVariant { | |
| 354 | − QVariant result; | |
| 353 | + QFuture<QString> future = QtConcurrent::run([weakScriptManager, consoleFileName, command]() -> QString { | |
| 354 | + QString result; | |
| 355 | 355 | auto scriptManager = weakScriptManager.lock(); |
| 356 | 356 | if (scriptManager) { |
| 357 | 357 | BLOCKING_INVOKE_METHOD(scriptManager.get(), [&scriptManager, &consoleFileName, &command, &result]() -> void { |
| 358 | − result = scriptManager->evaluate(command, consoleFileName).toVariant(); | |
| 358 | + result = scriptManager->evaluate(command, consoleFileName).repr(); | |
| 359 | 359 | }); |
| 360 | 360 | } |
| 361 | 361 | return result; |
| @@ -364,7 +364,7 @@ void JSConsole::executeCommand(const QString& command) { · 2 unmodified lines | ||
| 364 | 364 | } |
| 365 | 365 | |
| 366 | 366 | void JSConsole::commandFinished() { |
| 367 | − QVariant result = _executeWatcher.result(); | |
| 367 | + auto result = _executeWatcher.result(); | |
| 368 | 368 | |
| 369 | 369 | _ui->promptTextEdit->setDisabled(false); |
| 370 | 370 | |
| @@ -378,7 +378,7 @@ void JSConsole::commandFinished() { · 7 unmodified lines | ||
| 378 | 378 | |
| 379 | 379 | QColor color = _lightTheme ? QColorConstants::Svg::gray : QColorConstants::Svg::darkgray; |
| 380 | 380 | |
| 381 | − appendMessage("<", result.toString(), color); | |
| 381 | + appendMessage("<", result, color); | |
| 382 | 382 | |
| 383 | 383 | resetCurrentCommandHistory(); |
| 384 | 384 | } |