Compare commits

...

3 Commits

Author SHA1 Message Date
zhuzichu 76aa9a87c5
Merge pull request #442 from yangxingpping/main
vs2019下example退出之后程序会崩溃
2024-03-02 11:37:46 +08:00
abc 04eaed1d69 Merge branch 'main' of https://github.com/zhuzichu520/FluentUI 2024-03-02 08:46:01 +08:00
abc 6c2c125332 fix crash before exit program with vs2019 2024-03-02 08:45:58 +08:00
3 changed files with 7 additions and 0 deletions

View File

@ -207,3 +207,8 @@ void Log::setup(const QString &app,int level)
qInfo()<<"[LOG_PATH]"<<g_file_path;
qInfo()<<"===================================================";
}
void Log::teardown()
{
qInstallMessageHandler(0);
}

View File

@ -6,6 +6,7 @@ namespace Log
{
QString prettyProductInfoWrapper();
void setup(const QString &app,int level = 4);
void teardown();
}
#endif // LOG_H

View File

@ -82,5 +82,6 @@ int main(int argc, char *argv[])
if (exec == 931) {
QProcess::startDetached(qApp->applicationFilePath(), QStringList());
}
Log::teardown();
return exec;
}