Showing the changes to interface/src/Application.cpp (1 of 101 files). Show all
Unified · Split
| @@ -58,7 +58,7 @@ · 57 unmodified lines | ||
| 58 | 58 | #include <HFActionEvent.h> |
| 59 | 59 | #include <HFBackEvent.h> |
| 60 | 60 | #include <LocalVoxelsList.h> |
| 61 | −#include <Logging.h> | |
| 61 | +#include <LogHandler.h> | |
| 62 | 62 | #include <NetworkAccessManager.h> |
| 63 | 63 | #include <OctalCode.h> |
| 64 | 64 | #include <OctreeSceneStats.h> |
| @@ -116,12 +116,10 @@ const QString SKIP_FILENAME = QStandardPaths::writableLocation(QStandardPaths::D · 51 unmodified lines | ||
| 116 | 116 | const QString DEFAULT_SCRIPTS_JS_URL = "http://public.highfidelity.io/scripts/defaultScripts.js"; |
| 117 | 117 | |
| 118 | 118 | void messageHandler(QtMsgType type, const QMessageLogContext& context, const QString& message) { |
| 119 | − if (message.size() > 0) { | |
| 120 | − QString dateString = QDateTime::currentDateTime().toTimeSpec(Qt::LocalTime).toString(Qt::ISODate); | |
| 121 | − QString formattedMessage = QString("[%1] %2\n").arg(dateString).arg(message); | |
| 122 | − | |
| 123 | − fprintf(stdout, "%s", qPrintable(formattedMessage)); | |
| 124 | − Application::getInstance()->getLogger()->addMessage(qPrintable(formattedMessage)); | |
| 119 | + QString logMessage = LogHandler::getInstance().printMessage((LogMsgType) type, context, message); | |
| 120 | + | |
| 121 | + if (!logMessage.isEmpty()) { | |
| 122 | + Application::getInstance()->getLogger()->addMessage(qPrintable(logMessage)); | |
| 125 | 123 | } |
| 126 | 124 | } |
| 127 | 125 | |
| @@ -581,10 +579,6 @@ void Application::initializeGL() { · 453 unmodified lines | ||
| 581 | 579 | float startupTime = (float)_applicationStartupTime.elapsed() / 1000.0; |
| 582 | 580 | _justStarted = false; |
| 583 | 581 | qDebug("Startup time: %4.2f seconds.", startupTime); |
| 584 | − const char LOGSTASH_INTERFACE_START_TIME_KEY[] = "interface-start-time"; | |
| 585 | − | |
| 586 | − // ask the Logstash class to record the startup time | |
| 587 | − Logging::stashValue(STAT_TYPE_TIMER, LOGSTASH_INTERFACE_START_TIME_KEY, startupTime); | |
| 588 | 582 | } |
| 589 | 583 | |
| 590 | 584 | // update before the first render |
| @@ -3175,7 +3169,7 @@ void Application::renderRearViewMirror(const QRect& region, bool billboard) { · 2584 unmodified lines | ||
| 3175 | 3169 | } else { |
| 3176 | 3170 | // if not rendering the billboard, the region is in device independent coordinates; must convert to device |
| 3177 | 3171 | QSize size = getTextureCache()->getFrameBufferSize(); |
| 3178 | − float ratio = QApplication::desktop()->windowHandle()->devicePixelRatio(); | |
| 3172 | + float ratio = QApplication::desktop()->windowHandle()->devicePixelRatio() * _renderResolutionScale; | |
| 3179 | 3173 | int x = region.x() * ratio, y = region.y() * ratio, width = region.width() * ratio, height = region.height() * ratio; |
| 3180 | 3174 | glViewport(x, size.height() - y - height, width, height); |
| 3181 | 3175 | glScissor(x, size.height() - y - height, width, height); |