mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-29 15:03:09 +02:00
Merge pull request #16217 from Atlante45/fix/flush-timer
BUGZ-489: Make sure the flush timer is not spawned too early
This commit is contained in:
commit
22dffa5ce8
5 changed files with 12 additions and 12 deletions
|
@ -240,6 +240,9 @@ AssignmentClientApp::AssignmentClientApp(int argc, char* argv[]) :
|
||||||
|
|
||||||
QThread::currentThread()->setObjectName("main thread");
|
QThread::currentThread()->setObjectName("main thread");
|
||||||
|
|
||||||
|
LogHandler::getInstance().setParent(this);
|
||||||
|
LogHandler::getInstance().setupRepeatedMessageFlusher();
|
||||||
|
|
||||||
DependencyManager::registerInheritance<LimitedNodeList, NodeList>();
|
DependencyManager::registerInheritance<LimitedNodeList, NodeList>();
|
||||||
DependencyManager::set<ScriptInitializers>();
|
DependencyManager::set<ScriptInitializers>();
|
||||||
|
|
||||||
|
|
|
@ -174,6 +174,9 @@ DomainServer::DomainServer(int argc, char* argv[]) :
|
||||||
|
|
||||||
LogUtils::init();
|
LogUtils::init();
|
||||||
|
|
||||||
|
LogHandler::getInstance().setParent(this);
|
||||||
|
LogHandler::getInstance().setupRepeatedMessageFlusher();
|
||||||
|
|
||||||
qDebug() << "Setting up domain-server";
|
qDebug() << "Setting up domain-server";
|
||||||
qDebug() << "[VERSION] Build sequence:" << qPrintable(applicationVersion());
|
qDebug() << "[VERSION] Build sequence:" << qPrintable(applicationVersion());
|
||||||
qDebug() << "[VERSION] MODIFIED_ORGANIZATION:" << BuildInfo::MODIFIED_ORGANIZATION;
|
qDebug() << "[VERSION] MODIFIED_ORGANIZATION:" << BuildInfo::MODIFIED_ORGANIZATION;
|
||||||
|
|
|
@ -1060,6 +1060,9 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo
|
||||||
setProperty(hifi::properties::STEAM, (steamClient && steamClient->isRunning()));
|
setProperty(hifi::properties::STEAM, (steamClient && steamClient->isRunning()));
|
||||||
setProperty(hifi::properties::CRASHED, _previousSessionCrashed);
|
setProperty(hifi::properties::CRASHED, _previousSessionCrashed);
|
||||||
|
|
||||||
|
LogHandler::getInstance().setParent(this);
|
||||||
|
LogHandler::getInstance().setupRepeatedMessageFlusher();
|
||||||
|
|
||||||
{
|
{
|
||||||
const QStringList args = arguments();
|
const QStringList args = arguments();
|
||||||
|
|
||||||
|
|
|
@ -32,14 +32,6 @@ LogHandler& LogHandler::getInstance() {
|
||||||
return staticInstance;
|
return staticInstance;
|
||||||
}
|
}
|
||||||
|
|
||||||
LogHandler::LogHandler() {
|
|
||||||
// make sure we setup the repeated message flusher, but do it on the LogHandler thread
|
|
||||||
QMetaObject::invokeMethod(this, "setupRepeatedMessageFlusher");
|
|
||||||
}
|
|
||||||
|
|
||||||
LogHandler::~LogHandler() {
|
|
||||||
}
|
|
||||||
|
|
||||||
const char* stringForLogType(LogMsgType msgType) {
|
const char* stringForLogType(LogMsgType msgType) {
|
||||||
switch (msgType) {
|
switch (msgType) {
|
||||||
case LogInfo:
|
case LogInfo:
|
||||||
|
|
|
@ -54,12 +54,11 @@ public:
|
||||||
int newRepeatedMessageID();
|
int newRepeatedMessageID();
|
||||||
void printRepeatedMessage(int messageID, LogMsgType type, const QMessageLogContext& context, const QString &message);
|
void printRepeatedMessage(int messageID, LogMsgType type, const QMessageLogContext& context, const QString &message);
|
||||||
|
|
||||||
private slots:
|
|
||||||
void setupRepeatedMessageFlusher();
|
void setupRepeatedMessageFlusher();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
LogHandler();
|
LogHandler() = default;
|
||||||
~LogHandler();
|
~LogHandler() = default;
|
||||||
|
|
||||||
void flushRepeatedMessages();
|
void flushRepeatedMessages();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue