diff --git a/oscar/SleepLib/profiles.cpp b/oscar/SleepLib/profiles.cpp index 7e16a07a..8ae04efa 100644 --- a/oscar/SleepLib/profiles.cpp +++ b/oscar/SleepLib/profiles.cpp @@ -37,8 +37,7 @@ Profile *p_profile; Profile::Profile(QString path) : is_first_day(true), - m_opened(false), - m_machopened(false) + m_opened(false) { p_name = STR_GEN_Profile; @@ -146,8 +145,10 @@ void Profile::addLock() bool Profile::OpenMachines() { - if (m_machopened) + if (m_machlist.size() > 0) { + qCritical() << "Skipping redundant call to Profile::OpenMachines"; return true; + } QString filename = p_path+"machines.xml"; QFile file(filename); @@ -239,7 +240,6 @@ bool Profile::OpenMachines() elem = elem.nextSiblingElement(); } - m_machopened = true; return true; } diff --git a/oscar/SleepLib/profiles.h b/oscar/SleepLib/profiles.h index 0a3d892d..706dd766 100644 --- a/oscar/SleepLib/profiles.h +++ b/oscar/SleepLib/profiles.h @@ -237,7 +237,6 @@ class Profile : public Preferences QDate m_last; bool m_opened; - bool m_machopened; QHash > MachineList;