mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-08-20 16:25:43 -05:00
fix new time matching if QTime is not initialized
This commit is contained in:
@@ -20,7 +20,7 @@ typedef enum {
|
||||
|
||||
struct TimeSwitch : SceneSwitcherEntry {
|
||||
timeTrigger trigger = ANY_DAY;
|
||||
QTime time = QTime();
|
||||
QTime time = QTime(0, 0);
|
||||
|
||||
const char *getType() { return "time"; }
|
||||
|
||||
|
||||
@@ -74,6 +74,9 @@ void AdvSceneSwitcher::on_timeDown_clicked()
|
||||
|
||||
bool timesAreInInterval(QTime &time1, QTime &time2, int &interval)
|
||||
{
|
||||
if (time1.isNull() || time2.isNull())
|
||||
return false;
|
||||
|
||||
bool ret = false;
|
||||
QTime validSwitchTimeWindow = time1.addMSecs(interval);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user