mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-25 17:14:59 +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");
|
||||
|
||||
LogHandler::getInstance().setParent(this);
|
||||
LogHandler::getInstance().setupRepeatedMessageFlusher();
|
||||
|
||||
DependencyManager::registerInheritance<LimitedNodeList, NodeList>();
|
||||
DependencyManager::set<ScriptInitializers>();
|
||||
|
||||
|
|
|
@ -174,6 +174,9 @@ DomainServer::DomainServer(int argc, char* argv[]) :
|
|||
|
||||
LogUtils::init();
|
||||
|
||||
LogHandler::getInstance().setParent(this);
|
||||
LogHandler::getInstance().setupRepeatedMessageFlusher();
|
||||
|
||||
qDebug() << "Setting up domain-server";
|
||||
qDebug() << "[VERSION] Build sequence:" << qPrintable(applicationVersion());
|
||||
qDebug() << "[VERSION] MODIFIED_ORGANIZATION:" << BuildInfo::MODIFIED_ORGANIZATION;
|
||||
|
@ -320,7 +323,7 @@ DomainServer::DomainServer(int argc, char* argv[]) :
|
|||
|
||||
connect(_contentManager.get(), &DomainContentBackupManager::recoveryCompleted, this, &DomainServer::restart);
|
||||
|
||||
static const int NODE_PING_MONITOR_INTERVAL_MSECS = 1 * MSECS_PER_SECOND;
|
||||
static const int NODE_PING_MONITOR_INTERVAL_MSECS = 1 * MSECS_PER_SECOND;
|
||||
_nodePingMonitorTimer = new QTimer{ this };
|
||||
connect(_nodePingMonitorTimer, &QTimer::timeout, this, &DomainServer::nodePingMonitor);
|
||||
_nodePingMonitorTimer->start(NODE_PING_MONITOR_INTERVAL_MSECS);
|
||||
|
|
|
@ -1060,6 +1060,9 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo
|
|||
setProperty(hifi::properties::STEAM, (steamClient && steamClient->isRunning()));
|
||||
setProperty(hifi::properties::CRASHED, _previousSessionCrashed);
|
||||
|
||||
LogHandler::getInstance().setParent(this);
|
||||
LogHandler::getInstance().setupRepeatedMessageFlusher();
|
||||
|
||||
{
|
||||
const QStringList args = arguments();
|
||||
|
||||
|
|
|
@ -32,14 +32,6 @@ LogHandler& LogHandler::getInstance() {
|
|||
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) {
|
||||
switch (msgType) {
|
||||
case LogInfo:
|
||||
|
|
|
@ -54,12 +54,11 @@ public:
|
|||
int newRepeatedMessageID();
|
||||
void printRepeatedMessage(int messageID, LogMsgType type, const QMessageLogContext& context, const QString &message);
|
||||
|
||||
private slots:
|
||||
void setupRepeatedMessageFlusher();
|
||||
|
||||
private:
|
||||
LogHandler();
|
||||
~LogHandler();
|
||||
LogHandler() = default;
|
||||
~LogHandler() = default;
|
||||
|
||||
void flushRepeatedMessages();
|
||||
|
||||
|
|
Loading…
Reference in a new issue