summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2018-08-06 13:30:52 -0700
committerThiago Macieira <thiago.macieira@intel.com>2018-08-07 14:41:08 +0000
commit491e427bb2d3cafccbb26d2ca3b7e128d786a564 (patch)
treed433854c10b1d0277a11f9cad0a6e8c8a5b460fc /src
parent59e0d72f64a98c13cb6b98c71f7d6a93bc585dd4 (diff)
QTimer: Add const to some singleShot methods
[ChangeLog][QtCore][QTimer] Fixed singleShot() methods that lacked proper "const" qualification to QObject context receivers. Task-number: QTBUG-69800 Change-Id: Ia741b559c24d46c78fb2fffd154865a9cb762473 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Diffstat (limited to 'src')
-rw-r--r--src/corelib/kernel/qtimer.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/kernel/qtimer.h b/src/corelib/kernel/qtimer.h
index 7825bb0798..f5c04c7f70 100644
--- a/src/corelib/kernel/qtimer.h
+++ b/src/corelib/kernel/qtimer.h
@@ -141,14 +141,14 @@ public:
template <typename Duration, typename Func1>
static inline typename std::enable_if<!QtPrivate::FunctionPointer<Func1>::IsPointerToMemberFunction &&
!std::is_same<const char*, Func1>::value, void>::type
- singleShot(Duration interval, QObject *context, Func1 slot)
+ singleShot(Duration interval, const QObject *context, Func1 slot)
{
singleShot(interval, defaultTypeFor(interval), context, std::move(slot));
}
template <typename Duration, typename Func1>
static inline typename std::enable_if<!QtPrivate::FunctionPointer<Func1>::IsPointerToMemberFunction &&
!std::is_same<const char*, Func1>::value, void>::type
- singleShot(Duration interval, Qt::TimerType timerType, QObject *context, Func1 slot)
+ singleShot(Duration interval, Qt::TimerType timerType, const QObject *context, Func1 slot)
{
//compilation error if the slot has arguments.
typedef QtPrivate::FunctionPointer<Func1> SlotType;