diff --git a/Building/MacOS/Info.plist.in b/Building/MacOS/Info.plist.in index 2d2b4a72..407b487a 100644 --- a/Building/MacOS/Info.plist.in +++ b/Building/MacOS/Info.plist.in @@ -2,25 +2,25 @@ - CFBundleExecutable - OSCAR - CFBundleGetInfoString - Created by Qt/QMake - CFBundleIconFile + CFBundleExecutable + OSCAR + CFBundleGetInfoString + Created by Qt/QMake + CFBundleIconFile ${ASSETCATALOG_COMPILER_APPICON_NAME} - CFBundleIdentifier + CFBundleIdentifier ${PRODUCT_BUNDLE_IDENTIFIER} - CFBundlePackageType - APPL - CFBundleSignature - ???? - LSMinimumSystemVersion + CFBundlePackageType + APPL + CFBundleSignature + ???? + LSMinimumSystemVersion ${MACOSX_DEPLOYMENT_TARGET} - NSPrincipalClass - NSApplication - NSSupportsAutomaticGraphicsSwitching - - NSRequiresAquaSystemAppearance - + NSPrincipalClass + NSApplication + NSSupportsAutomaticGraphicsSwitching + + NSRequiresAquaSystemAppearance + diff --git a/OSCAR_QT.pro b/OSCAR_QT.pro index 6a8c3dbb..df4e72bb 100644 --- a/OSCAR_QT.pro +++ b/OSCAR_QT.pro @@ -10,7 +10,3 @@ TEMPLATE = subdirs SUBDIRS += oscar CONFIG += ordered - -macx: { - QMAKE_INFO_PLIST = Building/MacOS/Info.plist.in -} diff --git a/oscar/SleepLib/profiles.cpp b/oscar/SleepLib/profiles.cpp index 87a26133..ba76dd75 100644 --- a/oscar/SleepLib/profiles.cpp +++ b/oscar/SleepLib/profiles.cpp @@ -581,16 +581,17 @@ void Profile::UnloadMachineData() return; } - for (auto & day : daylist) { - delete day; - } - daylist.clear(); - for (auto & mach : m_machlist) { mach->saveSessionInfo(); mach->sessionlist.clear(); mach->day.clear(); } + + for (auto & day : daylist) { + delete day; + } + daylist.clear(); + removeLock(); } void Profile::LoadMachineData(ProgressDialog *progress) diff --git a/oscar/oscar.pro b/oscar/oscar.pro index de7129bb..a881bbaa 100644 --- a/oscar/oscar.pro +++ b/oscar/oscar.pro @@ -457,3 +457,7 @@ test { tests/sessiontests.h } +# On macOS put a custom Info.plist into the bundle that disables dark mode on Mojave +macx { + QMAKE_INFO_PLIST = "../Building/MacOS/Info.plist.in" +}