summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swift/QtUI/QtUtilities.h')
-rw-r--r--Swift/QtUI/QtUtilities.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/Swift/QtUI/QtUtilities.h b/Swift/QtUI/QtUtilities.h
index ad58499..c6f4311 100644
--- a/Swift/QtUI/QtUtilities.h
+++ b/Swift/QtUI/QtUtilities.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2013 Isode Limited.
+ * Copyright (c) 2010-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -8,6 +8,7 @@
class QWidget;
class QString;
+class QDateTime;
#include <QKeyEvent>
@@ -19,4 +20,12 @@ namespace QtUtilities {
#else
const Qt::KeyboardModifier ctrlHardwareKeyModifier = Qt::ControlModifier;
#endif
+
+ /**
+ * @brief secondsToNextMidnight calculates the seconds until next midnight.
+ * @param currentTime This is the current time, which SHOULD have a Qt::TimeSpec
+ * of Qt::LocalTime to correctly handle DST changes in the current locale.
+ * @return
+ */
+ long long secondsToNextMidnight(const QDateTime& currentTime);
}