Skip to content

Commit

Permalink
change const-ness of arguments as appropriate
Browse files Browse the repository at this point in the history
  • Loading branch information
jyavenard committed Jul 9, 2013
1 parent a4efb82 commit 23b11ac
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
16 changes: 8 additions & 8 deletions mythtv/libs/libmythui/mythuinotificationcenter.cpp
Expand Up @@ -578,7 +578,7 @@ void NCPrivate::ScreenStackDeleted(void)
m_screenStack = NULL;
}

bool NCPrivate::Queue(MythNotification &notification)
bool NCPrivate::Queue(const MythNotification &notification)
{
QMutexLocker lock(&m_lock);

Expand Down Expand Up @@ -967,7 +967,7 @@ MythUINotificationCenter::~MythUINotificationCenter()
d = NULL;
}

bool MythUINotificationCenter::Queue(MythNotification &notification)
bool MythUINotificationCenter::Queue(const MythNotification &notification)
{
return d->Queue(notification);
}
Expand Down Expand Up @@ -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<MythUINotificationScreen*>(screen);
const MythUINotificationScreen *s =
dynamic_cast<const MythUINotificationScreen*>(screen);

if (!s)
return QDateTime();
return s->m_expiry;
}

bool MythUINotificationCenter::ScreenCreated(MythScreenType *screen)
bool MythUINotificationCenter::ScreenCreated(const MythScreenType *screen)
{
MythUINotificationScreen *s =
dynamic_cast<MythUINotificationScreen*>(screen);
const MythUINotificationScreen *s =
dynamic_cast<const MythUINotificationScreen*>(screen);

if (!s)
return true;;
Expand Down
6 changes: 3 additions & 3 deletions mythtv/libs/libmythui/mythuinotificationcenter.h
Expand Up @@ -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 &notification);
bool Queue(const MythNotification &notification);

/**
* returns the MythUINotificationCenter singleton
Expand Down Expand Up @@ -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()
Expand Down
6 changes: 3 additions & 3 deletions mythtv/libs/libmythui/mythuinotificationcenter_private.h
Expand Up @@ -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 &notification);
bool Queue(const MythNotification &notification);

/**
* returns the MythUINotificationCenter singleton
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit 23b11ac

Please sign in to comment.