From 1b695b73550e30f829ede6c147ecf9570de63101 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20G=C3=A2teau?= Date: Fri, 1 Aug 2014 10:56:30 +0200 Subject: [PATCH] Fix crash when logging at exit time --- src/libcalamares/utils/Logger.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/libcalamares/utils/Logger.cpp b/src/libcalamares/utils/Logger.cpp index 32a5c0c98..b0ac731c1 100644 --- a/src/libcalamares/utils/Logger.cpp +++ b/src/libcalamares/utils/Logger.cpp @@ -65,7 +65,10 @@ log( const char *msg, unsigned int debugLevel, bool toDisk = true ) { QMutexLocker lock( &s_mutex ); - logfile << QDate::currentDate().toString().toUtf8().data() + // If we don't format the date as a Qt::ISODate then we get a crash when + // logging at exit as Qt tries to use QLocale to format, but QLocale is + // on its way out. + logfile << QDate::currentDate().toString( Qt::ISODate ).toUtf8().data() << " - " << QTime::currentTime().toString().toUtf8().data() << " [" << QString::number( debugLevel ).toUtf8().data() << "]: "