From 23b11acc6b92b1f216264770b19748fd743d0899 Mon Sep 17 00:00:00 2001 From: Jean-Yves Avenard Date: Tue, 9 Jul 2013 16:51:21 +1000 Subject: [PATCH] change const-ness of arguments as appropriate --- .../libs/libmythui/mythuinotificationcenter.cpp | 16 ++++++++-------- mythtv/libs/libmythui/mythuinotificationcenter.h | 6 +++--- .../libmythui/mythuinotificationcenter_private.h | 6 +++--- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/mythtv/libs/libmythui/mythuinotificationcenter.cpp b/mythtv/libs/libmythui/mythuinotificationcenter.cpp index cbd0df79050..c0488aa9952 100644 --- a/mythtv/libs/libmythui/mythuinotificationcenter.cpp +++ b/mythtv/libs/libmythui/mythuinotificationcenter.cpp @@ -578,7 +578,7 @@ void NCPrivate::ScreenStackDeleted(void) m_screenStack = NULL; } -bool NCPrivate::Queue(MythNotification ¬ification) +bool NCPrivate::Queue(const MythNotification ¬ification) { QMutexLocker lock(&m_lock); @@ -967,7 +967,7 @@ MythUINotificationCenter::~MythUINotificationCenter() d = NULL; } -bool MythUINotificationCenter::Queue(MythNotification ¬ification) +bool MythUINotificationCenter::Queue(const MythNotification ¬ification) { return d->Queue(notification); } @@ -996,20 +996,20 @@ void MythUINotificationCenter::UnRegister(void *from, int id, bool closeimemdiat d->UnRegister(from, id, closeimemdiately); } -QDateTime MythUINotificationCenter::ScreenExpiryTime(MythScreenType *screen) +QDateTime MythUINotificationCenter::ScreenExpiryTime(const MythScreenType *screen) { - MythUINotificationScreen *s = - dynamic_cast(screen); + const MythUINotificationScreen *s = + dynamic_cast(screen); if (!s) return QDateTime(); return s->m_expiry; } -bool MythUINotificationCenter::ScreenCreated(MythScreenType *screen) +bool MythUINotificationCenter::ScreenCreated(const MythScreenType *screen) { - MythUINotificationScreen *s = - dynamic_cast(screen); + const MythUINotificationScreen *s = + dynamic_cast(screen); if (!s) return true;; diff --git a/mythtv/libs/libmythui/mythuinotificationcenter.h b/mythtv/libs/libmythui/mythuinotificationcenter.h index c2efa8f5586..1a445963dac 100644 --- a/mythtv/libs/libmythui/mythuinotificationcenter.h +++ b/mythtv/libs/libmythui/mythuinotificationcenter.h @@ -41,7 +41,7 @@ class MUI_PUBLIC MythUINotificationCenter * Queue() is thread-safe and can be called from anywhere. * Typical use would be MythUINotificationCenter::GetInstance()->Queue(notification) */ - bool Queue(MythNotification ¬ification); + bool Queue(const MythNotification ¬ification); /** * returns the MythUINotificationCenter singleton @@ -74,12 +74,12 @@ class MUI_PUBLIC MythUINotificationCenter * Return when the given screen is going to expire * will return an invalid QDateTime if screen isn't a MythUINotificationScreen */ - QDateTime ScreenExpiryTime(MythScreenType *screen); + QDateTime ScreenExpiryTime(const MythScreenType *screen); /** * Return true if ::Create() has been called on screen. * will always return true should screen not be a MythUINotificationScreen */ - bool ScreenCreated(MythScreenType *screen); + bool ScreenCreated(const MythScreenType *screen); /** * Return the list of notification screens being currently displayed. * The list contains pointer of existing screen's copies, with ::Create() diff --git a/mythtv/libs/libmythui/mythuinotificationcenter_private.h b/mythtv/libs/libmythui/mythuinotificationcenter_private.h index 923379d5efd..e37efe45030 100644 --- a/mythtv/libs/libmythui/mythuinotificationcenter_private.h +++ b/mythtv/libs/libmythui/mythuinotificationcenter_private.h @@ -43,7 +43,7 @@ public slots: * Queue() is thread-safe and can be called from anywhere. * Typical use would be MythUINotificationCenter::GetInstance()->Queue(notification) */ - bool Queue(MythNotification ¬ification); + bool Queue(const MythNotification ¬ification); /** * returns the MythUINotificationCenter singleton @@ -76,12 +76,12 @@ public slots: * Return when the given screen is going to expire * will return an invalid QDateTime if screen isn't a MythUINotificationScreen */ - QDateTime ScreenExpiryTime(MythScreenType *screen); + QDateTime ScreenExpiryTime(const MythScreenType *screen); /** * Return true if ::Create() has been called on screen. * will always return true should screen not be a MythUINotificationScreen */ - bool ScreenCreated(MythScreenType *screen); + bool ScreenCreated(const MythScreenType *screen); /** * Return the list of notification screens being currently displayed. * The list contains pointer of existing screen's copies, with ::Create()