# Conflicts: # libraries/gl/src/gl/OffscreenQmlSurface.cpp # libraries/gl/src/gl/OffscreenQmlSurface.h
Showing the changes to libraries/script-engine/src/ConsoleScriptingInterface.cpp (1 of 62 files). Show all
Unified · Split
| @@ -53,15 +53,8 @@ void ConsoleScriptingInterface::exception(QString message) { · 52 unmodified lines | ||
| 53 | 53 | } |
| 54 | 54 | |
| 55 | 55 | void ConsoleScriptingInterface::time(QString labelName) { |
| 56 | − QDateTime date; | |
| 57 | − std::string val_string = "2017-06-06 11:15:00.000"; | |
| 58 | − QString d = QString::fromStdString(val_string.substr(0, 19)); | |
| 59 | − date = QDateTime::fromString(d, "yyyy-MM-dd HH:mm:ss"); | |
| 60 | − qDebug() << d; | |
| 61 | − qDebug() << d.length() << date.toUTC(); | |
| 62 | − | |
| 63 | 56 | QDateTime _currentTime = QDateTime::currentDateTime().toUTC(); |
| 64 | − _listOfTimeValues.insert(labelName, date.toUTC()); | |
| 57 | + _listOfTimeValues.insert(labelName, _currentTime.toUTC()); | |
| 65 | 58 | } |
| 66 | 59 | |
| 67 | 60 | void ConsoleScriptingInterface::timeEnd(QString labelName) { |
| @@ -79,6 +72,7 @@ void ConsoleScriptingInterface::timeEnd(QString labelName) { · 11 unmodified lines | ||
| 79 | 72 | } |
| 80 | 73 | return; |
| 81 | 74 | } |
| 75 | + | |
| 82 | 76 | QDateTime _currentDateTimeValue = QDateTime::currentDateTime().toUTC(); |
| 83 | 77 | _dateTimeOfLabel = _listOfTimeValues.value(labelName); |
| 84 | 78 | |
| @@ -113,7 +107,7 @@ void ConsoleScriptingInterface::asserts(bool condition, QString message) { · 28 unmodified lines | ||
| 113 | 107 | if (message.isEmpty()) { |
| 114 | 108 | message = assertFailed; |
| 115 | 109 | } else { |
| 116 | − if (typeid(message) != typeid(QString)) { | |
| 110 | + if (typeid(message) != typeid(QString)) { | |
| 117 | 111 | message = assertFailed; |
| 118 | 112 | } else { |
| 119 | 113 | message = assertFailed + " " + message; |
| @@ -122,7 +116,7 @@ void ConsoleScriptingInterface::asserts(bool condition, QString message) { · 2 unmodified lines | ||
| 122 | 116 | if (ScriptEngine* scriptEngine = qobject_cast<ScriptEngine*>(engine())) { |
| 123 | 117 | scriptEngine->scriptErrorMessage(message); |
| 124 | 118 | } |
| 125 | − } | |
| 119 | + } | |
| 126 | 120 | } |
| 127 | 121 | |
| 128 | 122 | void ConsoleScriptingInterface::trace(QString labelName) { |
| @@ -130,8 +124,9 @@ void ConsoleScriptingInterface::trace(QString labelName) { · 1 unmodified line | ||
| 130 | 124 | scriptEngine->scriptErrorMessage(labelName); |
| 131 | 125 | } |
| 132 | 126 | } |
| 133 | −void ConsoleScriptingInterface::clear() { | |
| 127 | + | |
| 128 | +void ConsoleScriptingInterface::clear() { | |
| 134 | 129 | if (ScriptEngine* scriptEngine = qobject_cast<ScriptEngine*>(engine())) { |
| 135 | 130 | scriptEngine->clearConsole(); |
| 136 | 131 | } |
| 137 | −} | |
| 132 | +} | |