mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-07-30 07:44:13 +02:00
Merge pull request #563 from DieterMayerOSS/pr/log-handler-before-startup
Install the log message handler before the application starts
This commit is contained in:
+8
-2
@@ -253,6 +253,14 @@ QGuiApplication::setHighDpiScaleFactorRoundingPolicy(QetSettings::hdpiScaleFacto
|
||||
}
|
||||
}
|
||||
|
||||
// Install the log-file message handler BEFORE the application starts:
|
||||
// QETApp's constructor does the whole startup (collections, editor,
|
||||
// opening the projects given on the command line), so installing the
|
||||
// handler afterwards - as was done in the startup worker below - meant
|
||||
// exactly the interesting lines (collection and project load timers)
|
||||
// went to stderr, which is invisible in a Windows GUI session.
|
||||
qInstallMessageHandler(myMessageOutput);
|
||||
|
||||
SingleApplication app(argc, argv, true);
|
||||
#ifdef Q_OS_MACOS
|
||||
app.setStyle(QStyleFactory::create("Fusion"));
|
||||
@@ -298,8 +306,6 @@ QGuiApplication::setHighDpiScaleFactorRoundingPolicy(QetSettings::hdpiScaleFacto
|
||||
|
||||
[[maybe_unused]] auto startup_future = QtConcurrent::run([=]()
|
||||
{
|
||||
// for debugging
|
||||
qInstallMessageHandler(myMessageOutput);
|
||||
qInfo("Start-up");
|
||||
// delete old log files of max 7 days old.
|
||||
delete_old_log_files(7);
|
||||
|
||||
Reference in New Issue
Block a user