| 140 | |
| 141 | namespace { |
| 142 | void appDebugOutput(QtMsgType type, const QMessageLogContext &context, const QString &msg) |
| 143 | { |
| 144 | const char *levels = "DWCFIS"; |
| 145 | const QString format("%1 %2 %3\n"); |
| 146 | |
| 147 | qint64 msecstotal = APPLICATION->timeSinceStart(); |
| 148 | qint64 seconds = msecstotal / 1000; |
| 149 | qint64 msecs = msecstotal % 1000; |
| 150 | QString foo; |
| 151 | char buf[1025] = {0}; |
| 152 | ::snprintf(buf, 1024, "%5lld.%03lld", seconds, msecs); |
| 153 | |
| 154 | QString out = format.arg(buf).arg(levels[type]).arg(msg); |
| 155 | |
| 156 | APPLICATION->logFile->write(out.toUtf8()); |
| 157 | APPLICATION->logFile->flush(); |
| 158 | QTextStream(stderr) << out.toLocal8Bit(); |
| 159 | fflush(stderr); |
| 160 | } |
| 161 | |
| 162 | QString getIdealPlatform(QString currentPlatform) { |
| 163 | auto info = Sys::getKernelInfo(); |
nothing calls this directly
no test coverage detected