2 changes: 1 addition & 1 deletion mythtv/libs/libmythbase/mythdbcon.h
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ class MBASE_PUBLIC MSqlQuery : private QSqlQuery
~MSqlQuery();

/// \brief Only updated once during object creation
bool isConnected(void) { return m_isConnected; }
bool isConnected(void) const { return m_isConnected; }

/// \brief Wrap QSqlQuery::exec() so we can display SQL
bool exec(void);
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythbase/mythdownloadmanager.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class MBASE_PUBLIC MythDownloadManager : public QObject, public MThread
void run(void) override; // MThread
void setRunThread(void) { m_runThread = true; }
QThread *getQueueThread(void) { return m_queueThread; }
bool isRunning(void) { return m_isRunning; }
bool isRunning(void) const { return m_isRunning; }

// Methods to GET a URL
void preCache(const QString &url);
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythbase/mythevent.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ class MBASE_PUBLIC ExternalKeycodeEvent : public QEvent
explicit ExternalKeycodeEvent(const int key) :
QEvent(kEventType), m_keycode(key) {}

int getKeycode() { return m_keycode; }
int getKeycode() const { return m_keycode; }

static Type kEventType;

Expand Down
4 changes: 2 additions & 2 deletions mythtv/libs/libmythbase/mythplugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ class MythPlugin : public QLibrary
// if such a function exists.
void destroy(void);

bool isEnabled() { return m_enabled; }
bool isEnabled() const { return m_enabled; }
void setEnabled(bool enable) { m_enabled = enable; }

int getPosition() { return m_position; }
int getPosition() const { return m_position; }
void setPosition(int pos) { m_position = pos; }

QString getName(void) { return m_plugName; }
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythbase/mythpower.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ bool MythPower::IsFeatureSupported(Feature Supported)
return result;
}

int MythPower::GetPowerLevel(void)
int MythPower::GetPowerLevel(void) const
{
int result = UnknownPower;
s_lock.lock();
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythbase/mythpower.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class MBASE_PUBLIC MythPower : public QObject, public ReferenceCounter
virtual bool RequestFeature (Feature Request, bool Delay = true);
Features GetFeatures (void);
bool IsFeatureSupported(Feature Supported);
int GetPowerLevel (void);
int GetPowerLevel (void) const;

public slots:
virtual void CancelFeature (void);
Expand Down
6 changes: 3 additions & 3 deletions mythtv/libs/libmythbase/mythsystemlegacy.h
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ class MBASE_PUBLIC MythSystemLegacy : public QObject
// FIXME: Rename "GetExitStatus" and document that this does not
// block until an exit status exists.
// FIXME: Document what this actually returns.
uint GetStatus(void) { return m_status; }
uint GetStatus(void) const { return m_status; }
// FIXME Make private.
void SetStatus(uint status) { m_status = status; }

Expand Down Expand Up @@ -148,8 +148,8 @@ class MBASE_PUBLIC MythSystemLegacy : public QObject
// after construcion.
void SetArgs(QStringList &args) { m_args = args; }

int GetNice(void) { return m_nice; }
int GetIOPrio(void) { return m_ioprio; }
int GetNice(void) const { return m_nice; }
int GetIOPrio(void) const { return m_ioprio; }

// FIXME: We should not return a pointer to a QBuffer
QBuffer *GetBuffer(int index) { return &m_stdbuff[index]; }
Expand Down
6 changes: 3 additions & 3 deletions mythtv/libs/libmythbase/serverpool.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,10 @@ class MBASE_PUBLIC ServerPool : public QObject
qint64 writeDatagram(const QByteArray &datagram,
const QHostAddress &addr, quint16 port);

bool isListening(void) { return m_listening; }
int maxPendingConnections(void) { return m_maxPendingConn; }
bool isListening(void) const { return m_listening; }
int maxPendingConnections(void) const { return m_maxPendingConn; }
void setMaxPendingConnections(int n) { m_maxPendingConn = n; }
quint16 serverPort(void) { return m_port; }
quint16 serverPort(void) const { return m_port; }

QNetworkProxy proxy(void) { return m_proxy; }
void setProxy(const QNetworkProxy &proxy) { m_proxy = proxy; }
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythbase/threadedfilewriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ void ThreadedFileWriter::Flush(void)
* designed with Linux in mind. Other OS's may benefit from
* revisiting this function.
*/
void ThreadedFileWriter::Sync(void)
void ThreadedFileWriter::Sync(void) const
{
if (m_fd >= 0)
{
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythbase/threadedfilewriter.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class MBASE_PUBLIC ThreadedFileWriter

void SetWriteBufferMinWriteSize(uint newMinSize = kMinWriteSize);

void Sync(void);
void Sync(void) const;
void Flush(void);
bool SetBlocking(bool block = true);
bool WritesFailing(void) const { return m_ignoreWrites; }
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythbase/unzip.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1358,7 +1358,7 @@ bool UnzipPrivate::testKeys(const ZipEntryP& header, quint32* keys)
/*!
\internal Decrypts an array of bytes long \p read.
*/
void UnzipPrivate::decryptBytes(quint32* keys, char* buffer, qint64 read)
void UnzipPrivate::decryptBytes(quint32* keys, char* buffer, qint64 read) const
{
for (int i=0; i<(int)read; ++i)
updateKeys(keys, buffer[i] ^= decryptByte(keys[2]));
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythbase/unzip_p.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ class UnzipPrivate

bool createDirectory(const QString& path);

inline void decryptBytes(quint32* keys, char* buffer, qint64 read);
inline void decryptBytes(quint32* keys, char* buffer, qint64 read) const;

static inline quint32 getULong(const unsigned char* data, quint32 offset) ;
static inline quint64 getULLong(const unsigned char* data, quint32 offset) ;
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythfreemheg/Engine.h
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ class MHEngine: public MHEG {
void AddLink(MHLink *pLink);
void RemoveLink(MHLink *pLink);

bool InTransition() { return m_fInTransition; }
bool InTransition() const { return m_fInTransition; }

bool GetEngineSupport(const MHOctetString &feature);

Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythfreemheg/ParseText.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ static int FindTag(const char *p)
// Ditto for the enumerated types
#define MAX_ENUM 30

void MHParseText::Error(const char *str)
void MHParseText::Error(const char *str) const
{
MHERROR(QString("%1- at line %2\n").arg(str).arg(m_lineCount));
}
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythfreemheg/ParseText.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class MHParseText: public MHParseBase
void GetNextChar();
void NextSym();
MHParseNode *DoParse();
void Error(const char *str);
void Error(const char *str) const;

int m_lineCount {1};

Expand Down
4 changes: 2 additions & 2 deletions mythtv/libs/libmythfreemheg/Text.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ class MHTextItem
int m_nTabCount; // Number of tabs immediately before this (usually zero)

// Generate new items inheriting properties from the previous
MHTextItem *NewItem();
MHTextItem *NewItem() const;
};

MHTextItem::MHTextItem()
Expand All @@ -489,7 +489,7 @@ MHTextItem::MHTextItem()
m_nTabCount = 0;
}

MHTextItem *MHTextItem::NewItem()
MHTextItem *MHTextItem::NewItem() const
{
auto *pItem = new MHTextItem;
pItem->m_colour = m_colour;
Expand Down
4 changes: 2 additions & 2 deletions mythtv/libs/libmythfreemheg/Visible.h
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,9 @@ class MHInteractible
virtual void InteractionCompleted(MHEngine * /*engine*/) {}

void InteractSetInteractionStatus(bool newStatus, MHEngine *engine);
bool InteractGetInteractionStatus(void) { return m_fInteractionStatus; }
bool InteractGetInteractionStatus(void) const { return m_fInteractionStatus; }
void InteractSetHighlightStatus(bool newStatus, MHEngine *engine);
bool InteractGetHighlightStatus(void) { return m_fHighlightStatus; }
bool InteractGetHighlightStatus(void) const { return m_fHighlightStatus; }
// InteractDeactivation should be applied in every Deactivation action
// of derived classes.
void InteractDeactivation(void) { m_fInteractionStatus = false; }
Expand Down
6 changes: 3 additions & 3 deletions mythtv/libs/libmythfreesurround/freesurround.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -440,17 +440,17 @@ void FreeSurround::close()
m_decoder = nullptr;
}

uint FreeSurround::numUnprocessedFrames()
uint FreeSurround::numUnprocessedFrames() const
{
return m_inCount;
}

uint FreeSurround::numFrames()
uint FreeSurround::numFrames() const
{
return m_outCount;
}

uint FreeSurround::frameLatency()
uint FreeSurround::frameLatency() const
{
if (m_processed)
return m_inCount + m_outCount + (block_size/2);
Expand Down
6 changes: 3 additions & 3 deletions mythtv/libs/libmythfreesurround/freesurround.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ class FreeSurround
uint receiveFrames(void *buffer, uint maxFrames);
// flush unprocessed samples
void flush();
uint numUnprocessedFrames();
uint numFrames();
uint numUnprocessedFrames() const;
uint numFrames() const;

long long getLatency();
uint frameLatency();
uint frameLatency() const;

static uint framesPerBlock();

Expand Down
26 changes: 13 additions & 13 deletions mythtv/libs/libmythmetadata/bluraymetadata.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,29 +37,29 @@ class META_PUBLIC BlurayMetadata : public QObject
QString GetAlternateTitle(void) { return m_alttitle; };
QString GetDiscLanguage(void) { return m_language; };

uint GetCurrentDiscNumber(void) { return m_discnumber; };
uint GetTotalDiscNumber(void) { return m_disctotal; };
uint GetCurrentDiscNumber(void) const { return m_discnumber; };
uint GetTotalDiscNumber(void) const { return m_disctotal; };

uint GetTitleCount(void) { return m_titles.count(); };
BlurayTitles GetTitles(void) { return m_titles; };

uint GetThumbnailCount(void) { return m_images.count(); };
QStringList GetThumbnails(void) {return m_images; };

bool GetTopMenuSupported(void) { return m_topMenuSupported; };
bool GetFirstPlaySupported(void) { return m_firstPlaySupported; };
bool GetTopMenuSupported(void) const { return m_topMenuSupported; };
bool GetFirstPlaySupported(void) const { return m_firstPlaySupported; };

uint32_t GetNumHDMVTitles(void) { return m_numHDMVTitles; };
uint32_t GetNumBDJTitles(void) { return m_numBDJTitles; };
uint32_t GetNumUnsupportedTitles(void) { return m_numUnsupportedTitles; };
uint32_t GetNumHDMVTitles(void) const { return m_numHDMVTitles; };
uint32_t GetNumBDJTitles(void) const { return m_numBDJTitles; };
uint32_t GetNumUnsupportedTitles(void) const { return m_numUnsupportedTitles; };

bool GetAACSDetected(void) { return m_aacsDetected; };
bool GetLibAACSDetected(void) { return m_libaacsDetected; };
bool GetAACSHandled(void) { return m_aacsHandled; };
bool GetAACSDetected(void) const { return m_aacsDetected; };
bool GetLibAACSDetected(void) const { return m_libaacsDetected; };
bool GetAACSHandled(void) const { return m_aacsHandled; };

bool GetBDPlusDetected(void) { return m_bdplusDetected; };
bool GetLibBDPlusDetected(void) { return m_libbdplusDetected; };
bool GetBDPlusHandled(void) { return m_bdplusHandled; };
bool GetBDPlusDetected(void) const { return m_bdplusDetected; };
bool GetLibBDPlusDetected(void) const { return m_libbdplusDetected; };
bool GetBDPlusHandled(void) const { return m_bdplusHandled; };

private:
BLURAY *m_bdnav {nullptr};
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythmetadata/imagemanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ class Device


//! Delete thumbnails associated with device
void RemoveThumbs(void)
void RemoveThumbs(void) const
{
// Remove thumbnails
QString dir = QString("%1/" TEMP_SUBDIR "/%2").arg(GetConfDir(), m_thumbs);
Expand Down
4 changes: 2 additions & 2 deletions mythtv/libs/libmythmetadata/imagemanager.h
Original file line number Diff line number Diff line change
Expand Up @@ -402,8 +402,8 @@ class META_PUBLIC ImageDbReader : protected ImageHandler<ImageDbLocal>
public:
~ImageDbReader() override { delete m_remote; }

int GetType() { return m_showType; }
bool GetVisibility() { return m_showHidden; }
int GetType() const { return m_showType; }
bool GetVisibility() const { return m_showHidden; }

void SetType(int showType)
{ m_showType = showType; SetRefinementClause(); }
Expand Down
4 changes: 2 additions & 2 deletions mythtv/libs/libmythmetadata/imagemetadata.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ int Orientation::GetCurrent(bool compensate)
* \param transform Rotation/flip to apply
* \return int New orientation code that will apply the transform to the image
*/
int Orientation::Apply(int transform)
int Orientation::Apply(int transform) const
{
if (transform == kResetToExif)
return m_file;
Expand Down Expand Up @@ -225,7 +225,7 @@ int Orientation::FromRotation(const QString &degrees)
* different, the Db orientation
* \return Text description of orientation
*/
QString Orientation::Description()
QString Orientation::Description() const
{
return (m_file == m_current)
? AsText(m_file)
Expand Down
6 changes: 3 additions & 3 deletions mythtv/libs/libmythmetadata/imagemetadata.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,17 +68,17 @@ class META_PUBLIC Orientation
Orientation(int current, int file) : m_current(current), m_file(file) {}

//! Encode original & current orientation to a single Db field
int Composite() { return m_current * 10 + m_file; }
int Composite() const { return m_current * 10 + m_file; }
int Transform(int transform);
int GetCurrent(bool compensate);
QString Description();
QString Description() const;

static int FromRotation(const QString &degrees);

private:
static QString AsText(int orientation);

int Apply(int transform);
int Apply(int transform) const;

using Matrix = QHash<int, QHash<int, int> >;

Expand Down
6 changes: 3 additions & 3 deletions mythtv/libs/libmythmetadata/lyricsdata.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class META_PUBLIC LyricsLine
}

private:
QString formatTime(void)
QString formatTime(void) const
{
QString res;
int minutes = m_time / (1000 * 60);
Expand Down Expand Up @@ -78,10 +78,10 @@ class META_PUBLIC LyricsData : public QObject
QMap<int, LyricsLine*>* lyrics(void) { return &m_lyricsMap; }
void setLyrics(const QStringList &lyrics);

bool syncronized(void) { return m_syncronized; }
bool syncronized(void) const { return m_syncronized; }
void setSyncronized(bool syncronized ) { m_syncronized = syncronized; }

bool changed(void) { return m_changed; }
bool changed(void) const { return m_changed; }
void setChanged(bool changed) { m_changed = changed; }

enum Status
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythmetadata/videometadata.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1268,7 +1268,7 @@ void VideoMetadata::toMap(InfoMap &metadataMap)
}


void VideoMetadata::GetStateMap(InfoMap &stateMap)
void VideoMetadata::GetStateMap(InfoMap &stateMap) const
{
stateMap["trailerstate"] = TrailerToState(GetTrailer());
stateMap["userratingstate"] =
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythmetadata/videometadata.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ class META_PUBLIC VideoMetadata
bool sortBefore(const VideoMetadata &rhs) const;

void toMap(InfoMap &metadataMap);
void GetStateMap(InfoMap &stateMap);
void GetStateMap(InfoMap &stateMap) const;
void GetImageMap(InfoMap &imageMap);

const QString &GetPrefix() const;
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythmetadata/videoscan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ bool VideoScannerThread::updateDB(const FileCheckList &add, const PurgeList &rem

bool VideoScannerThread::buildFileList(const QString &directory,
const QStringList &imageExtensions,
FileCheckList &filelist)
FileCheckList &filelist) const
{
// TODO: FileCheckList is a std::map, keyed off the filename. In the event
// multiple backends have access to shared storage, the potential exists
Expand Down
4 changes: 2 additions & 2 deletions mythtv/libs/libmythmetadata/videoscan.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ class META_PUBLIC VideoScannerThread : public MThread
void SetHosts(const QStringList &hosts);
void SetProgressDialog(MythUIProgressDialog *dialog) { m_dialog = dialog; };
QStringList GetOfflineSGHosts(void) { return m_offlineSGHosts; };
bool getDataChanged() { return m_dbDataChanged; };
bool getDataChanged() const { return m_dbDataChanged; };

void ResetCounts() { m_addList.clear(); m_movList.clear(); m_delList.clear(); };

Expand All @@ -91,7 +91,7 @@ class META_PUBLIC VideoScannerThread : public MThread
bool updateDB(const FileCheckList &add, const PurgeList &remove);
bool buildFileList(const QString &directory,
const QStringList &imageExtensions,
FileCheckList &filelist);
FileCheckList &filelist) const;

void SendProgressEvent(uint progress, uint total = 0,
QString messsage = QString());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ class PROTOSERVER_PUBLIC DeleteHandler : public ReferenceCounter
void Close(void);

QString GetPath(void) { return m_path; }
int GetFD(void) { return m_fd; }
off_t GetSize(void) { return m_size; }
int GetFD(void) const { return m_fd; }
off_t GetSize(void) const { return m_size; }
QDateTime GetWait(void) { return m_wait; }

void SetPath(QString path) { m_path= std::move(path); }
Expand Down
6 changes: 3 additions & 3 deletions mythtv/libs/libmythprotoserver/sockethandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ class PROTOSERVER_PUBLIC SocketHandler : public ReferenceCounter
QString hostname);
~SocketHandler() override;

bool DoesBlockShutdown(void) { return m_blockShutdown; }
bool GetsStandardEvents(void) { return m_standardEvents; }
bool GetsSystemEvents(void) { return m_systemEvents; }
bool DoesBlockShutdown(void) const { return m_blockShutdown; }
bool GetsStandardEvents(void) const { return m_standardEvents; }
bool GetsSystemEvents(void) const { return m_systemEvents; }

QString GetHostname(void) { return m_hostname; }

Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythtv/AirPlay/mythairplayserver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ class APHTTPRequest
return result;
}

bool IsComplete(void)
bool IsComplete(void) const
{
return !m_incomingPartial;
}
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythtv/AirPlay/mythraopconnection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1568,7 +1568,7 @@ QString MythRAOPConnection::stringFromSeconds(int timeInSeconds)
* Description: return the duration in ms of frames
*
*/
uint64_t MythRAOPConnection::framesToMs(uint64_t frames)
uint64_t MythRAOPConnection::framesToMs(uint64_t frames) const
{
return (frames * 1000ULL) / m_frameRate;
}
Expand Down
4 changes: 2 additions & 2 deletions mythtv/libs/libmythtv/AirPlay/mythraopconnection.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class MTV_PUBLIC MythRAOPConnection : public QObject
~MythRAOPConnection() override;
bool Init(void);
QTcpSocket *GetSocket() { return m_socket; }
int GetDataPort() { return m_dataPort; }
int GetDataPort() const { return m_dataPort; }
bool HasAudio() { return m_audio; }
static QMap<QString,QString> decodeDMAP(const QByteArray &dmap);
static RSA *LoadKey(void);
Expand Down Expand Up @@ -106,7 +106,7 @@ class MTV_PUBLIC MythRAOPConnection : public QObject
int64_t AudioCardLatency(void);
static QStringList splitLines(const QByteArray &lines);
static QString stringFromSeconds(int timeInSeconds);
uint64_t framesToMs(uint64_t frames);
uint64_t framesToMs(uint64_t frames) const;

// notification functions
void SendNotification(bool update = false);
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythtv/Bluray/bdringbuffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1050,7 +1050,7 @@ uint64_t BDRingBuffer::GetTotalReadPosition(void)
return 0;
}

int64_t BDRingBuffer::AdjustTimestamp(int64_t timestamp)
int64_t BDRingBuffer::AdjustTimestamp(int64_t timestamp) const
{
int64_t newTimestamp = timestamp;

Expand Down
8 changes: 4 additions & 4 deletions mythtv/libs/libmythtv/Bluray/bdringbuffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ class MTV_PUBLIC BDRingBuffer : public RingBuffer
void ProgressUpdate(void);

// Player interaction
bool BDWaitingForPlayer(void) { return m_playerWait; }
bool BDWaitingForPlayer(void) const { return m_playerWait; }
void SkipBDWaitingForPlayer(void) { m_playerWait = false; }
void IgnoreWaitStates(bool ignore) override { m_ignorePlayerWait = ignore; } // RingBuffer
bool StartFromBeginning(void) override; // RingBuffer
Expand All @@ -104,12 +104,12 @@ class MTV_PUBLIC BDRingBuffer : public RingBuffer
uint64_t GetTitleSize(void) const { return m_titlesize; }
// Get The total duration of the current title in 90Khz ticks.
uint64_t GetTotalTimeOfTitle(void) const { return (m_currentTitleLength / 90000); }
uint64_t GetCurrentTime(void) { return (m_currentTime / 90000); }
uint64_t GetCurrentTime(void) const { return (m_currentTime / 90000); }
long long GetReadPosition(void) const override; // RingBuffer
uint64_t GetTotalReadPosition(void);
uint32_t GetNumChapters(void);
uint32_t GetCurrentChapter(void);
uint64_t GetNumAngles(void) { return m_currentTitleAngleCount; }
uint64_t GetNumAngles(void) const { return m_currentTitleAngleCount; }
uint64_t GetChapterStartTime(uint32_t chapter);
uint64_t GetChapterStartFrame(uint32_t chapter);
bool IsOpen(void) const override { return m_bdnav; } // RingBuffer
Expand All @@ -120,7 +120,7 @@ class MTV_PUBLIC BDRingBuffer : public RingBuffer
bool IsValidStream(int streamid);
void UnblockReading(void) { m_processState = PROCESS_REPROCESS; }
bool IsReadingBlocked(void) { return (m_processState == PROCESS_WAIT); }
int64_t AdjustTimestamp(int64_t timestamp);
int64_t AdjustTimestamp(int64_t timestamp) const;

void GetDescForPos(QString &desc);
double GetFrameRate(void);
Expand Down
12 changes: 6 additions & 6 deletions mythtv/libs/libmythtv/DVD/dvdringbuffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ bool DVDRingBuffer::IsSeekingAllowed(void)
(m_processState != PROCESS_WAIT));
}

void DVDRingBuffer::GetDescForPos(QString &desc)
void DVDRingBuffer::GetDescForPos(QString &desc) const
{
if (m_inMenu)
{
Expand Down Expand Up @@ -613,7 +613,7 @@ long long DVDRingBuffer::GetReadPosition(void) const
return pos * DVD_BLOCK_SIZE;
}

uint32_t DVDRingBuffer::AdjustTimestamp(uint32_t timestamp)
uint32_t DVDRingBuffer::AdjustTimestamp(uint32_t timestamp) const
{
uint32_t newTimestamp = timestamp;

Expand All @@ -625,7 +625,7 @@ uint32_t DVDRingBuffer::AdjustTimestamp(uint32_t timestamp)
return newTimestamp;
}

int64_t DVDRingBuffer::AdjustTimestamp(int64_t timestamp)
int64_t DVDRingBuffer::AdjustTimestamp(int64_t timestamp) const
{
int64_t newTimestamp = timestamp;

Expand Down Expand Up @@ -1308,14 +1308,14 @@ void DVDRingBuffer::prevTrack(void)
/** \brief get the total time of the title in seconds
* 90000 ticks = 1 sec
*/
uint DVDRingBuffer::GetTotalTimeOfTitle(void)
uint DVDRingBuffer::GetTotalTimeOfTitle(void) const
{
return lround(m_pgcLength / 90000.0);
}

/** \brief get the start of the cell in seconds
*/
uint DVDRingBuffer::GetCellStart(void)
uint DVDRingBuffer::GetCellStart(void) const
{
return m_cellStart / 90000;
}
Expand Down Expand Up @@ -2050,7 +2050,7 @@ void DVDRingBuffer::SetTrack(uint type, int trackNo)
* or determined from the dvd IFO.
* \param type: use either kTrackTypeSubtitle or kTrackTypeAudio
*/
int DVDRingBuffer::GetTrack(uint type)
int DVDRingBuffer::GetTrack(uint type) const
{
if (type == kTrackTypeSubtitle)
return m_curSubtitleTrack;
Expand Down
30 changes: 15 additions & 15 deletions mythtv/libs/libmythtv/DVD/dvdringbuffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,27 +98,27 @@ class MTV_PUBLIC DVDRingBuffer : public RingBuffer

// gets
int GetTitle(void) const { return m_title; }
bool DVDWaitingForPlayer(void) { return m_playerWait; }
bool DVDWaitingForPlayer(void) const { return m_playerWait; }
int GetPart(void) const { return m_part; }
int GetCurrentAngle(void) const { return m_currentAngle; }
int GetNumAngles(void) { return m_currentTitleAngleCount; }
int GetNumAngles(void) const { return m_currentTitleAngleCount; }
bool IsOpen(void) const override { return m_dvdnav; } // RingBuffer
long long GetTotalReadPosition(void) { return m_titleLength; }
long long GetTotalReadPosition(void) const { return m_titleLength; }
uint GetChapterLength(void) const { return m_pgLength / 90000; }
void GetChapterTimes(QList<long long> &times);
uint64_t GetChapterTimes(uint title);
long long GetReadPosition(void) const override; // RingBuffer
void GetDescForPos(QString &desc);
void GetDescForPos(QString &desc) const;
void GetPartAndTitle(int &_part, int &_title) const
{ _part = m_part; _title = m_title; }
uint GetTotalTimeOfTitle(void);
float GetAspectOverride(void) { return m_forcedAspect; }
uint GetTotalTimeOfTitle(void) const;
float GetAspectOverride(void) const { return m_forcedAspect; }
bool IsBookmarkAllowed(void) override; // RingBuffer
bool IsSeekingAllowed(void) override; // RingBuffer
bool IsStreamed(void) override { return true; } // RingBuffer
int BestBufferSize(void) override { return 2048; } // RingBuffer

uint GetCellStart(void);
uint GetCellStart(void) const;
bool PGCLengthChanged(void);
bool CellChanged(void);
bool IsInStillFrame(void) const override { return m_still > 0; } // RingBuffer
Expand All @@ -128,8 +128,8 @@ class MTV_PUBLIC DVDRingBuffer : public RingBuffer
int NumPartsInTitle(void) const { return m_titleParts; }
void GetMenuSPUPkt(uint8_t *buf, int buf_size, int stream_id, uint32_t startTime);

uint32_t AdjustTimestamp(uint32_t timestamp);
int64_t AdjustTimestamp(int64_t timestamp);
uint32_t AdjustTimestamp(uint32_t timestamp) const;
int64_t AdjustTimestamp(int64_t timestamp) const;
MythDVDContext* GetDVDContext(void);
int32_t GetLastEvent(void) const { return m_dvdEvent; }

Expand All @@ -155,10 +155,10 @@ class MTV_PUBLIC DVDRingBuffer : public RingBuffer
bool GetDVDStateSnapshot(QString& state);
bool RestoreDVDStateSnapshot(QString& state);
double GetFrameRate(void);
bool StartOfTitle(void) { return (m_part == 0); }
bool EndOfTitle(void) { return ((m_titleParts == 0) ||
(m_part == (m_titleParts - 1)) ||
(m_titleParts == 1)); }
bool StartOfTitle(void) const { return (m_part == 0); }
bool EndOfTitle(void) const { return ((m_titleParts == 0) ||
(m_part == (m_titleParts - 1)) ||
(m_titleParts == 1)); }

// commands
bool OpenFile(const QString &lfilename,
Expand All @@ -184,10 +184,10 @@ class MTV_PUBLIC DVDRingBuffer : public RingBuffer

void IgnoreWaitStates(bool ignore) override { m_skipstillorwait = ignore; } // RingBuffer
void AudioStreamsChanged(bool change) { m_audioStreamsChanged = change; }
int64_t GetCurrentTime(void) { return (m_currentTime / 90000); }
int64_t GetCurrentTime(void) const { return (m_currentTime / 90000); }
uint TitleTimeLeft(void);
void SetTrack(uint type, int trackNo);
int GetTrack(uint type);
int GetTrack(uint type) const;
uint8_t GetNumAudioChannels(int idx);
void SetDVDSpeed(void);
void SetDVDSpeed(int speed);
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythtv/HLS/httplivestreambuffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -781,7 +781,7 @@ class HLSStream
* Will download all required segment AES-128 keys
* Will try to re-use already downloaded keys if possible
*/
int ManageSegmentKeys()
int ManageSegmentKeys() const
{
HLSSegment *seg = nullptr;
HLSSegment *prev_seg = nullptr;
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythtv/avfringbuffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class AVFRingBuffer
static int64_t AVF_Seek(URLContext *h, int64_t offset, int whence);
static int AVF_Close(URLContext *h);
void SetInInit(bool state);
bool IsInInit(void) { return m_initState; }
bool IsInInit(void) const { return m_initState; }

private:
RingBuffer *m_rbuffer {nullptr};
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythtv/channelscan/channelimporter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -711,7 +711,7 @@ ScanDTVTransportList ChannelImporter::UpdateChannels(
UpdateAction action,
ChannelType type,
ScanDTVTransportList &updated_list,
ScanDTVTransportList &skipped_list)
ScanDTVTransportList &skipped_list) const
{
QString channelFormat = "%1_%2";
bool renameChannels = false;
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythtv/channelscan/channelimporter.h
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ class MTV_PUBLIC ChannelImporter
UpdateAction action,
ChannelType type,
ScanDTVTransportList &updated,
ScanDTVTransportList &skipped);
ScanDTVTransportList &skipped) const;

/// For multiple channels
DeleteAction QueryUserDelete(const QString &msg);
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythtv/decoders/decoderbase.h
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ class DecoderBase
void ResetTotalDuration(void) { m_totalDuration = AVRationalInit(0); }
void SaveTotalFrames(void);
void TrackTotalDuration(bool track) { m_trackTotalDuration = track; }
int GetfpsMultiplier(void) { return m_fpsMultiplier; }
int GetfpsMultiplier(void) const { return m_fpsMultiplier; }
MythCodecContext *GetMythCodecContext(void) { return m_mythCodecCtx; }
VideoDisplayProfile * GetVideoDisplayProfile(void) { return &m_videoDisplayProfile; }
AVPixelFormat GetBestVideoFormat(AVPixelFormat* Formats);
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythtv/decoders/mythvdpauhelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ bool MythVDPAUHelper::InitProcs(void)
return ok;
}

bool MythVDPAUHelper::IsValid(void)
bool MythVDPAUHelper::IsValid(void) const
{
return m_valid;
}
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythtv/decoders/mythvdpauhelper.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class MythVDPAUHelper : public QObject
explicit MythVDPAUHelper(AVVDPAUDeviceContext *Context);
~MythVDPAUHelper(void) override;

bool IsValid(void);
bool IsValid(void) const;
void SetPreempted(void);
bool IsFeatureAvailable(uint Feature);
VdpOutputSurface CreateOutputSurface(QSize Size);
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythtv/deletemap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -844,7 +844,7 @@ void DeleteMap::TrackerReset(uint64_t frame)
* \brief Returns true if the given frame has passed the last cut point start
* and provides the frame number of the next jump.
*/
bool DeleteMap::TrackerWantsToJump(uint64_t frame, uint64_t &to)
bool DeleteMap::TrackerWantsToJump(uint64_t frame, uint64_t &to) const
{
if (IsEmpty() || !m_nextCutStartIsValid || frame < m_nextCutStart)
return false;
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythtv/deletemap.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ class MTV_PUBLIC DeleteMap
uint64_t TranslatePositionRelToAbs(uint64_t position) const;

void TrackerReset(uint64_t frame);
bool TrackerWantsToJump(uint64_t frame, uint64_t &to);
bool TrackerWantsToJump(uint64_t frame, uint64_t &to) const;

bool Undo(void);
bool Redo(void);
Expand Down
4 changes: 2 additions & 2 deletions mythtv/libs/libmythtv/diseqc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ bool DiSEqCDevTree::Store(uint cardid, const QString &device)
return true;
}

bool DiSEqCDevTree::SetTone(bool on)
bool DiSEqCDevTree::SetTone(bool on) const
{
(void) on;

Expand Down Expand Up @@ -677,7 +677,7 @@ static bool send_diseqc(int fd, const dvb_diseqc_master_cmd &cmd)
* \param data Pointer to optional data.
*/
bool DiSEqCDevTree::SendCommand(uint adr, uint cmd, uint repeats,
uint data_len, unsigned char *data)
uint data_len, unsigned char *data) const
{
// check payload validity
if (data_len > 3 || (data_len > 0 && !data))
Expand Down
4 changes: 2 additions & 2 deletions mythtv/libs/libmythtv/diseqc.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ class DiSEqCDevTree
void SetRoot(DiSEqCDevDevice *root);

bool SendCommand(uint adr, uint cmd, uint repeats = 0,
uint data_len = 0, unsigned char *data = nullptr);
uint data_len = 0, unsigned char *data = nullptr) const;

bool ResetDiseqc(bool hard_reset, bool is_SCR);

Expand All @@ -103,7 +103,7 @@ class DiSEqCDevTree
int GetFD(void) const { return m_fdFrontend; }

// Sets
bool SetTone(bool on);
bool SetTone(bool on) const;
bool SetVoltage(uint voltage);

// Gets
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythtv/mheg/dsmccbiop.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -572,7 +572,7 @@ int BiopIor::Process(const unsigned char *data)
}

// An IOR may refer to other streams. We may have to add taps for them.
void BiopIor::AddTap(Dsmcc *pStatus)
void BiopIor::AddTap(Dsmcc *pStatus) const
{
DSMCCCacheReference *ref = m_profileBody->GetReference();
if (ref != nullptr)
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythtv/mheg/dsmccbiop.h
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ class BiopIor
}

int Process(const unsigned char *data);
void AddTap(Dsmcc *pStatus);
void AddTap(Dsmcc *pStatus) const;

unsigned long m_typeIdLen {0};
char *m_typeId {nullptr};
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythtv/mheg/mhi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -737,7 +737,7 @@ void MHIContext::UpdateOSD(InteractiveScreen *osdWindow,
osdWindow->SetVisible(true);
}

void MHIContext::GetInitialStreams(int &audioTag, int &videoTag)
void MHIContext::GetInitialStreams(int &audioTag, int &videoTag) const
{
audioTag = m_audioTag;
videoTag = m_videoTag;
Expand Down
6 changes: 3 additions & 3 deletions mythtv/libs/libmythtv/mheg/mhi.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ class MHIContext : public MHContext, public QRunnable
{ return m_stop; }

/// Get the initial component tags.
void GetInitialStreams(int &audioTag, int &videoTag);
void GetInitialStreams(int &audioTag, int &videoTag) const;

/// Creation functions for various visibles.
MHDLADisplay *CreateDynamicLineArt(
Expand Down Expand Up @@ -161,9 +161,9 @@ class MHIContext : public MHContext, public QRunnable
QRect ScaleVideo(const QRect &r) const;

FT_Face GetFontFace(void) { return m_face; }
bool IsFaceLoaded(void) { return m_faceLoaded; }
bool IsFaceLoaded(void) const { return m_faceLoaded; }
bool LoadFont(const QString& name);
bool ImageUpdated(void) { return m_updated; }
bool ImageUpdated(void) const { return m_updated; }

static const int kStdDisplayWidth = 720;
static const int kStdDisplayHeight = 576;
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythtv/mpeg/mpegtables.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -733,7 +733,7 @@ uint ProgramMapTable::FindPIDs(uint type,
return pids.size();
}

uint ProgramMapTable::FindUnusedPID(uint desired_pid)
uint ProgramMapTable::FindUnusedPID(uint desired_pid) const
{
uint pid = desired_pid;
if (pid >= MPEG_NULL_PID)
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythtv/mpeg/mpegtables.h
Original file line number Diff line number Diff line change
Expand Up @@ -775,7 +775,7 @@ class MTV_PUBLIC ProgramMapTable : public PSIPTable
return i;
return -1;
}
uint FindUnusedPID(uint desired_pid = 0x20);
uint FindUnusedPID(uint desired_pid = 0x20) const;

void RemoveAllStreams(void)
{
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythtv/mythccextractorplayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ bool MythCCExtractorPlayer::run(void)
*/

void MythCCExtractorPlayer::IngestSubtitle(
QList<OneSubtitle> &list, const QStringList &content)
QList<OneSubtitle> &list, const QStringList &content) const
{
bool update_last =
!list.isEmpty() &&
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythtv/mythccextractorplayer.h
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ class MTV_PUBLIC MythCCExtractorPlayer : public MythPlayer
TeletextReader *GetTeletextReader(uint id=0) override; // MythPlayer

private:
void IngestSubtitle(QList<OneSubtitle> &list, const QStringList &content);
void IngestSubtitle(QList<OneSubtitle> &list, const QStringList &content) const;
static void IngestSubtitle(QList<OneSubtitle> &list, const OneSubtitle &content);

enum { kProcessNormal = 0, kProcessFinalize = 1 };
Expand Down
4 changes: 2 additions & 2 deletions mythtv/libs/libmythtv/mythplayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,7 @@ static inline QString toQString(FrameScanType scan) {

FrameScanType MythPlayer::detectInterlace(FrameScanType newScan,
FrameScanType scan,
float fps, int video_height)
float fps, int video_height) const
{
QString dbg = QString("detectInterlace(") + toQString(newScan) +
QString(", ") + toQString(scan) + QString(", ") +
Expand Down Expand Up @@ -1285,7 +1285,7 @@ void MythPlayer::SetCaptionsEnabled(bool enable, bool osd_msg)
ResetCaptions();
}

bool MythPlayer::GetCaptionsEnabled(void)
bool MythPlayer::GetCaptionsEnabled(void) const
{
return (kDisplayNUVTeletextCaptions == m_textDisplayMode) ||
(kDisplayTeletextCaptions == m_textDisplayMode) ||
Expand Down
4 changes: 2 additions & 2 deletions mythtv/libs/libmythtv/mythplayer.h
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,7 @@ class MTV_PUBLIC MythPlayer
bool ToggleCaptions(uint type);
bool HasTextSubtitles(void) { return m_subReader.HasTextSubtitles(); }
void SetCaptionsEnabled(bool enable, bool osd_msg=true);
bool GetCaptionsEnabled(void);
bool GetCaptionsEnabled(void) const;
virtual void DisableCaptions(uint mode, bool osd_msg=true);
virtual void EnableCaptions(uint mode, bool osd_msg=true);

Expand Down Expand Up @@ -593,7 +593,7 @@ class MTV_PUBLIC MythPlayer
protected:
// Private initialization stuff
FrameScanType detectInterlace(FrameScanType newScan, FrameScanType scan,
float fps, int video_height);
float fps, int video_height) const;
virtual void AutoDeint(VideoFrame* frame, bool allow_lock = true);

// Private Sets
Expand Down
4 changes: 2 additions & 2 deletions mythtv/libs/libmythtv/opengl/mythegldmabuf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ static void inline DebugDRMFrame(AVDRMFrameDescriptor* Desc)

inline vector<MythVideoTexture*> MythEGLDMABUF::CreateComposed(AVDRMFrameDescriptor* Desc,
MythRenderOpenGL *Context,
VideoFrame *Frame, FrameScanType Scan)
VideoFrame *Frame, FrameScanType Scan) const
{
vector<MythVideoTexture*> result;
for (int i = 0; i < (Scan == kScan_Progressive ? 1 : 2); ++i)
Expand Down Expand Up @@ -158,7 +158,7 @@ inline vector<MythVideoTexture*> MythEGLDMABUF::CreateComposed(AVDRMFrameDescrip

inline vector<MythVideoTexture*> MythEGLDMABUF::CreateSeparate(AVDRMFrameDescriptor* Desc,
MythRenderOpenGL *Context,
VideoFrame *Frame)
VideoFrame *Frame) const
{
// N.B. this works for YV12/NV12/P010 etc but will probably break for YUV422 etc
vector<QSize> sizes;
Expand Down
4 changes: 2 additions & 2 deletions mythtv/libs/libmythtv/opengl/mythegldmabuf.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ class MythEGLDMABUF
vector<MythVideoTexture*> CreateComposed(AVDRMFrameDescriptor* Desc,
MythRenderOpenGL *Context,
VideoFrame *Frame,
FrameScanType Scan);
FrameScanType Scan) const;
vector<MythVideoTexture*> CreateSeparate(AVDRMFrameDescriptor* Desc,
MythRenderOpenGL *Context,
VideoFrame *Frame);
VideoFrame *Frame) const;
bool m_useModifiers { false };
};

Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythtv/opengl/mythvdpauinterop.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ void MythVDPAUInterop::DisplayPreempted(void)
m_preempted = true;
}

bool MythVDPAUInterop::IsPreempted(void)
bool MythVDPAUInterop::IsPreempted(void) const
{
return m_preempted;
}
2 changes: 1 addition & 1 deletion mythtv/libs/libmythtv/opengl/mythvdpauinterop.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class MythVDPAUInterop : public MythOpenGLInterop
public slots:
void UpdateColourSpace(bool PrimariesChanged);
void DisplayPreempted(void);
bool IsPreempted(void);
bool IsPreempted(void) const;

protected:
static Type GetInteropType(VideoFrameType Format);
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythtv/osd.h
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ class OsdNavigation : public MythScreenType
void SetTextFromMap(const InfoMap &Map) override;
void ShowMenu(void) override;

int getVisibleGroup() { return m_visibleGroup; }
int getVisibleGroup() const { return m_visibleGroup; }

public slots:
void GeneralAction(void);
Expand Down
6 changes: 3 additions & 3 deletions mythtv/libs/libmythtv/playercontext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ void PlayerContext::ResizePIPWindow(const QRect &rect)
m_pipRect = QRect(rect);
}

bool PlayerContext::StartEmbedding(const QRect &embedRect)
bool PlayerContext::StartEmbedding(const QRect &embedRect) const
{
bool ret = false;
LockDeletePlayer(__FILE__, __LINE__);
Expand All @@ -273,7 +273,7 @@ bool PlayerContext::IsEmbedding(void) const
return ret;
}

void PlayerContext::StopEmbedding(void)
void PlayerContext::StopEmbedding(void) const
{
LockDeletePlayer(__FILE__, __LINE__);
if (m_player)
Expand Down Expand Up @@ -454,7 +454,7 @@ bool PlayerContext::StartPlaying(int maxWait)
return false;
}

void PlayerContext::StopPlaying(void)
void PlayerContext::StopPlaying(void) const
{
if (m_player)
m_player->StopPlaying();
Expand Down
6 changes: 3 additions & 3 deletions mythtv/libs/libmythtv/playercontext.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class MTV_PUBLIC PlayerContext
bool muted = false);
void TeardownPlayer(void);
bool StartPlaying(int maxWait = -1);
void StopPlaying(void);
void StopPlaying(void) const;
void UpdateTVChain(const QStringList &data = QStringList());
bool ReloadTVChain(void);
void CreatePIPWindow(const QRect &rect, int pos = -1,
Expand All @@ -67,8 +67,8 @@ class MTV_PUBLIC PlayerContext
bool StartPIPPlayer(TV *tv, TVState desiredState);
void PIPTeardown(void);
void SetNullVideo(bool setting) { m_useNullVideo = setting; }
bool StartEmbedding(const QRect &rect);
void StopEmbedding(void);
bool StartEmbedding(const QRect &rect) const;
void StopEmbedding(void) const;
void PushPreviousChannel(void);
QString PopPreviousChannel(void);

Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythtv/recorders/HLS/HLSStream.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class HLSRecStream
void SetVersion(int x) { m_version = x; }
int TargetDuration(void) const { return m_targetDuration; }
void SetTargetDuration(int x) { m_targetDuration = x; }
uint64_t AverageBandwidth(void) { return m_bandwidth; }
uint64_t AverageBandwidth(void) const { return m_bandwidth; }
uint64_t Bitrate(void) const { return m_bitrate; }
void SetBitrate(uint64_t bitrate) { m_bitrate = bitrate; }
uint64_t CurrentByteRate(void) const { return m_curByteRate; }
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythtv/recorders/channelbase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ void ChannelBase::HandleScript(const QString &freqid)
}

bool ChannelBase::ChangeInternalChannel(const QString &freqid,
uint inputid)
uint inputid) const
{
#ifdef USING_FIREWIRE
FirewireDevice *device = nullptr;
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythtv/recorders/channelbase.h
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ class ChannelBase
bool ChangeExternalChannel(const QString &changer,
const QString &freqid);
bool ChangeInternalChannel(const QString &freqid,
uint cardinputid);
uint cardinputid) const;

TVRec *m_pParent {nullptr};
QString m_curChannelName;
Expand Down
34 changes: 17 additions & 17 deletions mythtv/libs/libmythtv/recorders/dvbdev/dvbci.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ class cTPDU {
private:
int m_size {0};
uint8_t m_data[MAX_TPDU_SIZE] {0};
const uint8_t *GetData(const uint8_t *Data, int &Length);
const uint8_t *GetData(const uint8_t *Data, int &Length) const;
public:
cTPDU(void) = default;
cTPDU(uint8_t Slot, uint8_t Tcid, uint8_t Tag, int Length = 0, const uint8_t *Data = nullptr);
Expand Down Expand Up @@ -342,7 +342,7 @@ void cTPDU::Dump(bool Outgoing)
}
}

const uint8_t *cTPDU::GetData(const uint8_t *Data, int &Length)
const uint8_t *cTPDU::GetData(const uint8_t *Data, int &Length) const
{
if (m_size) {
Data = GetLength(Data, Length);
Expand Down Expand Up @@ -379,13 +379,13 @@ class cCiTransportConnection {
int m_lastResponse {ERROR};
bool m_dataAvailable {false};
void Init(int Fd, uint8_t Slot, uint8_t Tcid);
int SendTPDU(uint8_t Tag, int Length = 0, const uint8_t *Data = nullptr);
int SendTPDU(uint8_t Tag, int Length = 0, const uint8_t *Data = nullptr) const;
int RecvTPDU(void);
int CreateConnection(void);
int Poll(void);
eState State(void) { return m_state; }
int LastResponse(void) { return m_lastResponse; }
bool DataAvailable(void) { return m_dataAvailable; }
int LastResponse(void) const { return m_lastResponse; }
bool DataAvailable(void) const { return m_dataAvailable; }
public:
cCiTransportConnection(void);
~cCiTransportConnection();
Expand Down Expand Up @@ -419,7 +419,7 @@ void cCiTransportConnection::Init(int Fd, uint8_t Slot, uint8_t Tcid)
//XXX Clear()???
}

int cCiTransportConnection::SendTPDU(uint8_t Tag, int Length, const uint8_t *Data)
int cCiTransportConnection::SendTPDU(uint8_t Tag, int Length, const uint8_t *Data) const
{
cTPDU TPDU(m_slot, m_tcid, Tag, Length, Data);
return TPDU.Write(m_fd);
Expand Down Expand Up @@ -578,8 +578,8 @@ class cCiTransportLayer {
public:
cCiTransportLayer(int Fd, int NumSlots);
cCiTransportConnection *NewConnection(int Slot);
bool ResetSlot(int Slot);
bool ModuleReady(int Slot);
bool ResetSlot(int Slot) const;
bool ModuleReady(int Slot) const;
cCiTransportConnection *Process(int Slot);
};

Expand All @@ -605,7 +605,7 @@ cCiTransportConnection *cCiTransportLayer::NewConnection(int Slot)
return nullptr;
}

bool cCiTransportLayer::ResetSlot(int Slot)
bool cCiTransportLayer::ResetSlot(int Slot) const
{
dbgprotocol("Resetting slot %d...", Slot);
if (ioctl(m_fd, CA_RESET, 1 << Slot) != -1) {
Expand All @@ -617,7 +617,7 @@ bool cCiTransportLayer::ResetSlot(int Slot)
return false;
}

bool cCiTransportLayer::ModuleReady(int Slot)
bool cCiTransportLayer::ModuleReady(int Slot) const
{
ca_slot_info_t sinfo;
sinfo.num = Slot;
Expand Down Expand Up @@ -756,8 +756,8 @@ class cCiSession {
cCiSession(int SessionId, int ResourceId, cCiTransportConnection *Tc);
virtual ~cCiSession() = default;
const cCiTransportConnection *Tc(void) { return m_tc; }
int SessionId(void) { return m_sessionId; }
int ResourceId(void) { return m_resourceId; }
int SessionId(void) const { return m_sessionId; }
int ResourceId(void) const { return m_resourceId; }
virtual bool HasUserIO(void) { return false; }
virtual bool Process(int Length = 0, const uint8_t *Data = nullptr);
};
Expand Down Expand Up @@ -916,8 +916,8 @@ class cCiApplicationInformation : public cCiSession {
bool Process(int Length = 0, const uint8_t *Data = nullptr) override; // cCiSession
bool EnterMenu(void);
char *GetApplicationString() { return strdup(m_menuString); };
uint16_t GetApplicationManufacturer() { return m_applicationManufacturer; };
uint16_t GetManufacturerCode() { return m_manufacturerCode; };
uint16_t GetApplicationManufacturer() const { return m_applicationManufacturer; };
uint16_t GetManufacturerCode() const { return m_manufacturerCode; };
};

cCiApplicationInformation::cCiApplicationInformation(int SessionId, cCiTransportConnection *Tc)
Expand Down Expand Up @@ -996,7 +996,7 @@ class cCiConditionalAccessSupport : public cCiSession {
bool Process(int Length = 0, const uint8_t *Data = nullptr) override; // cCiSession
const unsigned short *GetCaSystemIds(void) { return m_caSystemIds; }
bool SendPMT(cCiCaPmt &CaPmt);
bool NeedCaPmt(void) { return m_needCaPmt; }
bool NeedCaPmt(void) const { return m_needCaPmt; }
};

cCiConditionalAccessSupport::cCiConditionalAccessSupport(
Expand Down Expand Up @@ -1870,7 +1870,7 @@ cHlCiHandler::~cHlCiHandler()
close(m_fdCa);
}

int cHlCiHandler::CommHL(unsigned tag, unsigned function, struct ca_msg *msg)
int cHlCiHandler::CommHL(unsigned tag, unsigned function, struct ca_msg *msg) const
{
if (tag) {
msg->msg[2] = tag & 0xff;
Expand Down Expand Up @@ -1988,7 +1988,7 @@ bool cHlCiHandler::SetCaPmt(cCiCaPmt &CaPmt, int /*Slot*/)
return true;
}

bool cHlCiHandler::Reset(int /*Slot*/)
bool cHlCiHandler::Reset(int /*Slot*/) const
{
if ((ioctl(m_fdCa, CA_RESET)) < 0) {
esyslog("ioctl CA_RESET failed.");
Expand Down
12 changes: 6 additions & 6 deletions mythtv/libs/libmythtv/recorders/dvbdev/dvbci.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ class cCiMenu {
const char *SubTitleText(void) { return m_subTitleText; }
const char *BottomText(void) { return m_bottomText; }
const char *Entry(int n) { return n < m_numEntries ? m_entries[n] : nullptr; }
int NumEntries(void) { return m_numEntries; }
bool Selectable(void) { return m_selectable; }
int NumEntries(void) const { return m_numEntries; }
bool Selectable(void) const { return m_selectable; }
bool Select(int Index);
bool Cancel(void);
};
Expand All @@ -105,8 +105,8 @@ class cCiEnquiry {
public:
~cCiEnquiry();
const char *Text(void) { return m_text; }
bool Blind(void) { return m_blind; }
int ExpectedLength(void) { return m_expectedLength; }
bool Blind(void) const { return m_blind; }
int ExpectedLength(void) const { return m_expectedLength; }
bool Reply(const char *s);
bool Cancel(void);
};
Expand Down Expand Up @@ -209,7 +209,7 @@ class cHlCiHandler : public cCiHandler {
int m_numCaSystemIds {0};
unsigned short m_caSystemIds[MAXCASYSTEMIDS + 1] {0}; // list is zero terminated!
cHlCiHandler(int Fd, int NumSlots);
int CommHL(unsigned tag, unsigned function, struct ca_msg *msg);
int CommHL(unsigned tag, unsigned function, struct ca_msg *msg) const;
int GetData(unsigned tag, struct ca_msg *msg);
int SendData(unsigned tag, struct ca_msg *msg);
public:
Expand All @@ -225,7 +225,7 @@ class cHlCiHandler : public cCiHandler {
bool SetCaPmt(cCiCaPmt &CaPmt);
const unsigned short *GetCaSystemIds(int Slot) override; // cCiHandler
bool SetCaPmt(cCiCaPmt &CaPmt, int Slot) override; // cCiHandler
bool Reset(int Slot);
bool Reset(int Slot) const;
bool connected() const;
};

Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythtv/recorders/recorderbase.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class FrameRate
uint getNum(void) const { return m_num; }
uint getDen(void) const { return m_den; }
QString toString(void) const { return QString("%1/%2").arg(m_num).arg(m_den); }
bool operator==(const FrameRate &other) {
bool operator==(const FrameRate &other) const {
return m_num == other.m_num && m_den == other.m_den;
}
bool operator!=(const FrameRate &other) { return !(*this == other); }
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythtv/recordingrule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -852,7 +852,7 @@ QStringList RecordingRule::GetTemplateNames(void)
return result;
}

bool RecordingRule::IsValid(QString &msg)
bool RecordingRule::IsValid(QString &msg) const
{
bool isOverride = false;
switch (m_type)
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythtv/recordingrule.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class MTV_PUBLIC RecordingRule
AutoExpireType GetAutoExpire(void) const
{ return m_autoExpire ? kNormalAutoExpire : kDisableAutoExpire; }

bool IsValid(QString &msg);
bool IsValid(QString &msg) const;

static QString SearchTypeToString(RecSearchType searchType);
static QStringList GetTemplateNames(void);
Expand Down
4 changes: 2 additions & 2 deletions mythtv/libs/libmythtv/ringbuffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ class MTV_PUBLIC RingBuffer : protected MThread
QString GetDecoderRate(void);
QString GetStorageRate(void);
QString GetAvailableBuffer(void);
uint GetBufferSize(void) { return m_bufferSize; }
uint GetBufferSize(void) const { return m_bufferSize; }
long long GetWritePosition(void) const;
/// \brief Returns the size of the file we are reading/writing,
/// or -1 if the query fails.
Expand All @@ -106,7 +106,7 @@ class MTV_PUBLIC RingBuffer : protected MThread
// LiveTV used utilities
int GetReadBufAvail() const;
bool SetReadInternalMode(bool mode);
bool IsReadInternalMode(void) { return m_readInternalMode; }
bool IsReadInternalMode(void) const { return m_readInternalMode; }

// DVD and bluray methods
bool IsDisc(void) const { return IsDVD() || IsBD(); }
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythtv/subtitlescreen.h
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ class SubtitleScreen : public MythScreenType

void EnableSubtitles(int type, bool forced_only = false);
void DisableForcedSubtitles(void);
int EnabledSubtitleType(void) { return m_subtitleType; }
int EnabledSubtitleType(void) const { return m_subtitleType; }

void ClearAllSubtitles(void);
void ClearNonDisplayedSubtitles(void);
Expand Down
10 changes: 5 additions & 5 deletions mythtv/libs/libmythtv/tv_rec.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -749,7 +749,7 @@ bool TVRec::StateIsPlaying(TVState state)
* returns a kState_None, otherwise returns kState_Error.
* \param state TVState to check.
*/
TVState TVRec::RemoveRecording(TVState state)
TVState TVRec::RemoveRecording(TVState state) const
{
if (StateIsRecording(state))
return kState_None;
Expand All @@ -765,7 +765,7 @@ TVState TVRec::RemoveRecording(TVState state)
* keep recording if we are watching an in progress recording.
* \param state TVState to check.
*/
TVState TVRec::RemovePlaying(TVState state)
TVState TVRec::RemovePlaying(TVState state) const
{
if (StateIsPlaying(state))
{
Expand Down Expand Up @@ -2174,7 +2174,7 @@ DTVSignalMonitor *TVRec::GetDTVSignalMonitor(void)
* RemoteEncoder::ShouldSwitchToAnotherInput(QString),
* CheckChannel(QString)
*/
bool TVRec::ShouldSwitchToAnotherInput(const QString& chanid)
bool TVRec::ShouldSwitchToAnotherInput(const QString& chanid) const
{
QString msg("");
MSqlQuery query(MSqlQuery::InitCon());
Expand Down Expand Up @@ -2313,7 +2313,7 @@ static QString add_spacer(const QString &channel, const QString &spacer)
bool TVRec::CheckChannelPrefix(const QString &prefix,
uint &complete_valid_channel_on_rec,
bool &is_extra_char_useful,
QString &needed_spacer)
QString &needed_spacer) const
{
#if DEBUG_CHANNEL_PREFIX
LOG(VB_GENERAL, LOG_DEBUG, QString("CheckChannelPrefix(%1)").arg(prefix));
Expand Down Expand Up @@ -4121,7 +4121,7 @@ static int init_jobs(const RecordingInfo *rec, RecordingProfile &profile,
}

QString TVRec::LoadProfile(void *tvchain, RecordingInfo *rec,
RecordingProfile &profile)
RecordingProfile &profile) const
{
// Determine the correct recording profile.
// In LiveTV mode use "Live TV" profile, otherwise use the
Expand Down
14 changes: 7 additions & 7 deletions mythtv/libs/libmythtv/tv_rec.h
Original file line number Diff line number Diff line change
Expand Up @@ -213,9 +213,9 @@ class MTV_PUBLIC TVRec : public SignalMonitorListener, public QRunnable
int ChangePictureAttribute(PictureAdjustType type, PictureAttribute attr,
bool direction);
bool CheckChannel(const QString& name) const;
bool ShouldSwitchToAnotherInput(const QString& chanid);
bool ShouldSwitchToAnotherInput(const QString& chanid) const;
bool CheckChannelPrefix(const QString &prefix, uint &complete_valid_channel_on_rec,
bool &is_extra_char_useful, QString &needed_spacer);
bool &is_extra_char_useful, QString &needed_spacer) const;
void GetNextProgram(BrowseDirection direction,
QString &title, QString &subtitle,
QString &desc, QString &category,
Expand All @@ -231,8 +231,8 @@ class MTV_PUBLIC TVRec : public SignalMonitorListener, public QRunnable
const QString& channame, const QString& xmltvid);

/// \brief Returns the inputid
uint GetInputId(void) { return m_inputId; }
uint GetParentId(void) { return m_parentId; }
uint GetInputId(void) const { return m_inputId; }
uint GetParentId(void) const { return m_parentId; }
uint GetMajorId(void) { return m_parentId ? m_parentId : m_inputId; }
/// \brief Returns true is "errored" is true, false otherwise.
bool IsErrored(void) const { return HasFlags(kFlagErrored); }
Expand Down Expand Up @@ -303,8 +303,8 @@ class MTV_PUBLIC TVRec : public SignalMonitorListener, public QRunnable
void ChangeState(TVState nextState);
static bool StateIsRecording(TVState state);
static bool StateIsPlaying(TVState state);
TVState RemovePlaying(TVState state);
TVState RemoveRecording(TVState state);
TVState RemovePlaying(TVState state) const;
TVState RemoveRecording(TVState state) const;

void HandlePendingRecordings(void);

Expand All @@ -330,7 +330,7 @@ class MTV_PUBLIC TVRec : public SignalMonitorListener, public QRunnable
RecStatus::Type new_status, int line, bool have_lock = false);

QString LoadProfile(void *tvchain, RecordingInfo *rec,
RecordingProfile &profile);
RecordingProfile &profile) const;

// Various components TVRec coordinates
RecorderBase *m_recorder {nullptr};
Expand Down
4 changes: 2 additions & 2 deletions mythtv/libs/libmythtv/videocolourspace.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -449,12 +449,12 @@ QMatrix4x4 VideoColourSpace::GetPrimaryMatrix(void)
return m_primaryMatrix;
}

float VideoColourSpace::GetColourGamma(void)
float VideoColourSpace::GetColourGamma(void) const
{
return m_colourGamma;
}

float VideoColourSpace::GetDisplayGamma(void)
float VideoColourSpace::GetDisplayGamma(void) const
{
return m_displayGamma;
}
Expand Down
4 changes: 2 additions & 2 deletions mythtv/libs/libmythtv/videocolourspace.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ class VideoColourSpace : public QObject, public QMatrix4x4, public ReferenceCoun
void SetAlpha(int Value);
QMatrix4x4 GetPrimaryMatrix(void);
QStringList GetColourMappingDefines(void);
float GetColourGamma(void);
float GetDisplayGamma(void);
float GetColourGamma(void) const;
float GetDisplayGamma(void) const;
PrimariesMode GetPrimariesMode(void);

struct ColourPrimaries
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythtv/videodisplayprofile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ bool VideoDisplayProfile::CheckVideoRendererGroup(const QString &Renderer)
return false;
}

bool VideoDisplayProfile::IsDecoderCompatible(const QString &Decoder)
bool VideoDisplayProfile::IsDecoderCompatible(const QString &Decoder) const
{
const QString dec = GetDecoder();
if (dec == Decoder)
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythtv/videodisplayprofile.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ class MTV_PUBLIC VideoDisplayProfile
void SetVideoRenderer(const QString &VideoRenderer);
bool CheckVideoRendererGroup(const QString &Renderer);
QString GetDecoder(void) const;
bool IsDecoderCompatible(const QString &Decoder);
bool IsDecoderCompatible(const QString &Decoder) const;
uint GetMaxCPUs(void) const ;
bool IsSkipLoopEnabled(void) const;
QString GetVideoRenderer(void) const;
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythui/mythdialogbox.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class MUI_PUBLIC DialogCompletionEvent : public QEvent
m_resultData(std::move(data)) { }

QString GetId() { return m_id; }
int GetResult() { return m_result; }
int GetResult() const { return m_result; }
QString GetResultText() { return m_resultText; }
QVariant GetData() { return m_resultData; }

Expand Down
4 changes: 2 additions & 2 deletions mythtv/libs/libmythui/mythdisplay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -725,12 +725,12 @@ bool MythDisplay::SwitchToGUI(bool Wait)
return true;
}

double MythDisplay::GetRefreshRate(void)
double MythDisplay::GetRefreshRate(void) const
{
return m_refreshRate;
}

int MythDisplay::GetRefreshInterval(int Fallback)
int MythDisplay::GetRefreshInterval(int Fallback) const
{
if (m_refreshRate > 20.0 && m_refreshRate < 200.0)
return static_cast<int>(lround(1000000.0 / m_refreshRate));
Expand Down
4 changes: 2 additions & 2 deletions mythtv/libs/libmythui/mythdisplay.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ class MUI_PUBLIC MythDisplay : public QObject, public ReferenceCounter
bool SwitchToVideo (QSize Size, double Rate = 0.0);
QSize GetResolution (void);
QSize GetPhysicalSize (void);
double GetRefreshRate (void);
int GetRefreshInterval (int Fallback);
double GetRefreshRate (void) const;
int GetRefreshInterval (int Fallback) const;
double GetAspectRatio (QString &Source, bool IgnoreModeOverride = false);
double EstimateVirtualAspectRatio(void);
MythEDID& GetEDID (void);
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythui/mythnotificationcenter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,7 @@ void MythNotificationScreen::Init(void)
m_refresh = false;
}

void MythNotificationScreen::SetErrorState(void)
void MythNotificationScreen::SetErrorState(void) const
{
if (!m_errorState)
return;
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythui/mythnotificationcenter_private.h
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ class MythNotificationScreen : public MythScreenType
void UpdateFrom(const MythNotificationScreen &s);

void SetSingleShotTimer(int s, bool update = false);
void SetErrorState(void);
void SetErrorState(void) const;

// UI methods
void AdjustYPosition(void);
Expand Down
4 changes: 2 additions & 2 deletions mythtv/libs/libmythui/mythpainter.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ class MUI_PUBLIC MythPainter
m_showNames = showNames;
}

bool ShowBorders(void) { return m_showBorders; }
bool ShowTypeNames(void) { return m_showNames; }
bool ShowBorders(void) const { return m_showBorders; }
bool ShowTypeNames(void) const { return m_showNames; }

void SetMaximumCacheSizes(int hardware, int software);

Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythui/mythpainter_qt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class MythQtImage : public MythImage
QPixmap *GetPixmap(void) { return m_pixmap; }
void SetPixmap(QPixmap *p) { m_pixmap = p; }

bool NeedsRegen(void) { return m_bRegenPixmap; }
bool NeedsRegen(void) const { return m_bRegenPixmap; }
void RegeneratePixmap(void);

protected:
Expand Down
4 changes: 2 additions & 2 deletions mythtv/libs/libmythui/mythprogressdialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ class MUI_PUBLIC ProgressUpdateEvent : public QEvent
m_message(std::move(message)) { }

QString GetMessage() { return m_message; }
uint GetTotal() { return m_total; }
uint GetCount() { return m_count; }
uint GetTotal() const { return m_total; }
uint GetCount() const { return m_count; }

static Type kEventType;

Expand Down
4 changes: 2 additions & 2 deletions mythtv/libs/libmythui/mythscreentype.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ class MUI_PUBLIC MythScreenType : public MythUIComposite
bool IsDeleting(void) const;
void SetDeleting(bool deleting);

bool IsLoading(void) { return m_IsLoading; }
bool IsLoaded(void) { return m_IsLoaded; }
bool IsLoading(void) const { return m_IsLoading; }
bool IsLoaded(void) const { return m_IsLoaded; }

MythPainter *GetPainter(void) override; // MythUIType

Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythui/myththemedmenu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ MythThemedMenu::~MythThemedMenu(void)

/// \brief Returns true iff a theme has been
/// found by a previous call to SetMenuTheme().
bool MythThemedMenu::foundTheme(void)
bool MythThemedMenu::foundTheme(void) const
{
return m_foundtheme;
}
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythui/myththemedmenu.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class MUI_PUBLIC MythThemedMenu : public MythThemedMenuState
bool allowreorder = false, MythThemedMenuState *state = nullptr);
~MythThemedMenu() override;

bool foundTheme(void);
bool foundTheme(void) const;

void getCallback(void (**lcallback)(void *, QString &), void **data);
void setCallback(void (*lcallback)(void *, QString &), void *data);
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythui/mythuianimation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

#include <QDomDocument>

QRect UIEffects::GetExtent(const QSize &size)
QRect UIEffects::GetExtent(const QSize &size) const
{
int x = 0;
int y = 0;
Expand Down
4 changes: 2 additions & 2 deletions mythtv/libs/libmythui/mythuianimation.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class UIEffects

UIEffects() = default;

QPointF GetCentre(const QRect &rect, int xoff, int yoff)
QPointF GetCentre(const QRect &rect, int xoff, int yoff) const
{
float x = xoff + rect.left();
float y = yoff + rect.top();
Expand All @@ -30,7 +30,7 @@ class UIEffects
return {x, y};
}

QRect GetExtent(const QSize &size);
QRect GetExtent(const QSize &size) const;

int m_alpha {255};
float m_hzoom {1.0F};
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythui/mythuifilebrowser.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class MUI_PUBLIC MFileInfo : public QFileInfo

QString fileName(void) const;
QString filePath(void) const;
bool isRemote(void) { return m_isRemote; }
bool isRemote(void) const { return m_isRemote; }
bool isDir(void) const;
bool isFile(void) const;
bool isParentDir(void) const;
Expand Down
6 changes: 3 additions & 3 deletions mythtv/libs/libmythui/mythuiguidegrid.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ class MUI_PUBLIC MythUIGuideGrid : public MythUIType

enum FillType { Alpha = 10, Dense, Eco, Solid };

bool isVerticalLayout(void) { return m_verticalLayout; }
int getChannelCount(void) { return m_channelCount; }
int getTimeCount(void) { return m_timeCount; }
bool isVerticalLayout(void) const { return m_verticalLayout; }
int getChannelCount(void) const { return m_channelCount; }
int getTimeCount(void) const { return m_timeCount; }

void SetCategoryColors(const QMap<QString, QString> &catColors);

Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythui/mythuiprogressbar.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class MUI_PUBLIC MythUIProgressBar : public MythUIType
void SetStart(int value);
void SetUsed(int value);
void SetTotal(int value);
int GetUsed(void) { return m_current; }
int GetUsed(void) const { return m_current; }
void SetVisible(bool visible) override; // MythUIType

protected:
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythui/mythuitext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ void MythUIText::SetJustification(int just)
}
}

int MythUIText::GetJustification(void)
int MythUIText::GetJustification(void) const
{
return m_Justification;
}
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythui/mythuitext.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class MUI_PUBLIC MythUIText : public MythUIType, public StorageUser
void CycleColor(const QColor& startColor, const QColor& endColor, int numSteps);
void StopCycling();

int GetJustification(void);
int GetJustification(void) const;
void SetCutDown(Qt::TextElideMode mode);
Qt::TextElideMode GetCutDown(void) const { return m_Cutdown; }
void SetMultiLine(bool multiline);
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythui/mythuitype.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,7 @@ void MythUIType::Pulse(void)
(*it)->Pulse();
}

int MythUIType::CalcAlpha(int alphamod)
int MythUIType::CalcAlpha(int alphamod) const
{
return (int)(m_Effects.m_alpha * (alphamod / 255.0));
}
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythui/mythuitype.h
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ class MUI_PUBLIC MythUIType : public QObject, public XMLParseBase
void HandleAlphaPulse();
void HandleMovementPulse();

int CalcAlpha(int alphamod);
int CalcAlpha(int alphamod) const;

static int NormX(int width);
static int NormY(int height);
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythui/mythuiwebbrowser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1219,7 +1219,7 @@ void MythUIWebBrowser::SetDefaultSaveFilename(const QString &filename)
* \brief Get the current zoom level
* \return the zoom level
*/
float MythUIWebBrowser::GetZoom(void)
float MythUIWebBrowser::GetZoom(void) const
{
return m_zoom;
}
Expand Down
6 changes: 3 additions & 3 deletions mythtv/libs/libmythui/mythuiwebbrowser.h
Original file line number Diff line number Diff line change
Expand Up @@ -153,14 +153,14 @@ class MUI_PUBLIC MythUIWebBrowser : public MythUIType
QString GetTitle(void);

void SetActive(bool active);
bool IsActive(void) { return m_active; }
bool IsActive(void) const { return m_active; }

/// returns true if all keypresses are to be passed to the web page
bool IsInputToggled(void) { return m_inputToggled; }
bool IsInputToggled(void) const { return m_inputToggled; }
void SetInputToggled(bool inputToggled) { m_inputToggled = inputToggled; }

void SetZoom(float zoom);
float GetZoom(void);
float GetZoom(void) const;

bool CanGoForward(void);
bool CanGoBack(void);
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythui/mythvirtualkeyboard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -614,7 +614,7 @@ QString MythUIVirtualKeyboard::decodeChar(QString c)
return res;
}

QString MythUIVirtualKeyboard::getKeyText(const KeyDefinition& key)
QString MythUIVirtualKeyboard::getKeyText(const KeyDefinition& key) const
{

if (m_shift)
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythui/mythvirtualkeyboard.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class MUI_PUBLIC MythUIVirtualKeyboard : public MythScreenType
void parseKey(const QDomElement &element);
void updateKeys(bool connectSignals = false);
static QString decodeChar(QString c);
QString getKeyText(const KeyDefinition& key);
QString getKeyText(const KeyDefinition& key) const;
static void loadEventKeyDefinitions(KeyEventDefinition *keyDef, const QString &action);

MythUITextEdit *m_parentEdit {nullptr};
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythui/opengl/mythopenglperf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ MythOpenGLPerf::MythOpenGLPerf(QString Name,
.arg(sampleCount()).arg(m_totalSamples));
}

int MythOpenGLPerf::GetTimersRunning(void)
int MythOpenGLPerf::GetTimersRunning(void) const
{
return m_timersRunning;
}
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythui/opengl/mythopenglperf.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class MUI_PUBLIC MythOpenGLPerf : public QOpenGLTimeMonitor
MythOpenGLPerf(QString Name, QVector<QString> Names, int SampleCount = 30);
void RecordSample (void);
void LogSamples (void);
int GetTimersRunning(void);
int GetTimersRunning(void) const;

private:
QString m_name { };
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythui/platforms/mythdrmdevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ bool MythDRMDevice::ConfirmDevice(const QString& Device)
return result;
}

drmModePropertyBlobPtr MythDRMDevice::GetBlobProperty(drmModeConnectorPtr Connector, const QString& Property)
drmModePropertyBlobPtr MythDRMDevice::GetBlobProperty(drmModeConnectorPtr Connector, const QString& Property) const
{
drmModePropertyBlobPtr result = nullptr;
if (!Connector || Property.isEmpty())
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythui/platforms/mythdrmdevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class MythDRMDevice : public ReferenceCounter
QString FindBestDevice (void);
static bool ConfirmDevice(const QString& Device);

drmModePropertyBlobPtr GetBlobProperty(drmModeConnectorPtr Connector, const QString& Property);
drmModePropertyBlobPtr GetBlobProperty(drmModeConnectorPtr Connector, const QString& Property) const;

private:
QScreen* m_screen { nullptr };
Expand Down
6 changes: 3 additions & 3 deletions mythtv/libs/libmythupnp/httprequest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -941,7 +941,7 @@ HttpContentType HTTPRequest::SetContentType( const QString &sType )
//
/////////////////////////////////////////////////////////////////////////////

QString HTTPRequest::GetResponseStatus( void )
QString HTTPRequest::GetResponseStatus( void ) const
{
switch( m_nResponseStatus )
{
Expand Down Expand Up @@ -1004,7 +1004,7 @@ QByteArray HTTPRequest::GetResponsePage( void )
//
/////////////////////////////////////////////////////////////////////////////

QString HTTPRequest::GetResponseType( void )
QString HTTPRequest::GetResponseType( void ) const
{
switch( m_eResponseType )
{
Expand Down Expand Up @@ -1870,7 +1870,7 @@ QString HTTPRequest::GetAuthenticationHeader(bool isStale)
//
/////////////////////////////////////////////////////////////////////////////

QString HTTPRequest::CalculateDigestNonce(const QString& timeStamp)
QString HTTPRequest::CalculateDigestNonce(const QString& timeStamp) const
{
QString uniqueID = QString("%1:%2").arg(timeStamp).arg(m_sPrivateToken);
QString hash = QCryptographicHash::hash( uniqueID.toLatin1(), QCryptographicHash::Sha1).toHex(); // TODO: Change to Sha2 with QT5?
Expand Down
8 changes: 4 additions & 4 deletions mythtv/libs/libmythupnp/httprequest.h
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,8 @@ class UPNP_PUBLIC HTTPRequest
bool ProcessSOAPPayload ( const QString &sSOAPAction );
void ExtractMethodFromURL( ); // Service method, not HTTP method

QString GetResponseStatus ( void );
QString GetResponseType ( void );
QString GetResponseStatus ( void ) const;
QString GetResponseType ( void ) const;
QString GetResponseHeaders ( void );

bool ParseRange ( QString sRange,
Expand All @@ -197,7 +197,7 @@ class UPNP_PUBLIC HTTPRequest
bool Authenticated ();

QString GetAuthenticationHeader (bool isStale = false);
QString CalculateDigestNonce ( const QString &timeStamp);
QString CalculateDigestNonce ( const QString &timeStamp) const;

bool BasicAuthentication ();
bool DigestAuthentication ();
Expand Down Expand Up @@ -232,7 +232,7 @@ class UPNP_PUBLIC HTTPRequest

QString GetRequestHeader ( const QString &sKey, QString sDefault );

bool GetKeepAlive () { return m_bKeepAlive; }
bool GetKeepAlive () const { return m_bKeepAlive; }

Serializer * GetSerializer ();

Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythupnp/servicehost.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
//
//////////////////////////////////////////////////////////////////////////////

QVariant MethodInfo::Invoke( Service *pService, const QStringMap &reqParams )
QVariant MethodInfo::Invoke( Service *pService, const QStringMap &reqParams ) const
{
HttpRedirectException exception;
bool bExceptionThrown = false;
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythupnp/servicehost.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class UPNP_PUBLIC MethodInfo
public:
MethodInfo() = default;

QVariant Invoke( Service *pService, const QStringMap &reqParams );
QVariant Invoke( Service *pService, const QStringMap &reqParams ) const;
};

using MetaInfoMap = QMap< QString, MethodInfo >;
Expand Down
4 changes: 2 additions & 2 deletions mythtv/libs/libmythupnp/ssdp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ QString SSDP::GetHeaderValue( const QStringMap &headers,

bool SSDP::ProcessSearchRequest( const QStringMap &sHeaders,
const QHostAddress& peerAddress,
quint16 peerPort )
quint16 peerPort ) const
{
QString sMAN = GetHeaderValue( sHeaders, "MAN", "" );
QString sST = GetHeaderValue( sHeaders, "ST" , "" );
Expand Down Expand Up @@ -740,7 +740,7 @@ bool SSDPExtension::ProcessRequest( HTTPRequest *pRequest )
//
/////////////////////////////////////////////////////////////////////////////

void SSDPExtension::GetDeviceDesc( HTTPRequest *pRequest )
void SSDPExtension::GetDeviceDesc( HTTPRequest *pRequest ) const
{
pRequest->m_eResponseType = ResponseTypeXML;

Expand Down
4 changes: 2 additions & 2 deletions mythtv/libs/libmythupnp/ssdp.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ class UPNP_PUBLIC SSDP : public MThread

bool ProcessSearchRequest ( const QStringMap &sHeaders,
const QHostAddress& peerAddress,
quint16 peerPort );
quint16 peerPort ) const;
static bool ProcessSearchResponse( const QStringMap &sHeaders );
static bool ProcessNotify ( const QStringMap &sHeaders );

Expand Down Expand Up @@ -149,7 +149,7 @@ class SSDPExtension : public HttpServerExtension

static SSDPMethod GetMethod( const QString &sURI );

void GetDeviceDesc( HTTPRequest *pRequest );
void GetDeviceDesc( HTTPRequest *pRequest ) const;
void GetFile ( HTTPRequest *pRequest, const QString& sFileName );
static void GetDeviceList( HTTPRequest *pRequest );

Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythupnp/upnpcdsobjects.h
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ class UPNP_PUBLIC CDSObject : public ReferenceCounter
Property *AddProperty( Property *pProp );
QList<Property*> GetProperties( const QString &sName );
CDSObject *AddChild ( CDSObject *pChild );
CDSObjects GetChildren( void ) { return m_children; }
CDSObjects GetChildren( void ) const { return m_children; }
CDSObject *GetChild ( const QString &sID );

ContainerClass *AddSearchClass( ContainerClass *pClass );
Expand Down
4 changes: 2 additions & 2 deletions mythtv/libs/libmythupnp/upnpdevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -657,7 +657,7 @@ UPnpDeviceDesc *UPnpDeviceDesc::Retrieve( QString &sURL )
//
/////////////////////////////////////////////////////////////////////////////

QString UPnpDeviceDesc::GetHostName()
QString UPnpDeviceDesc::GetHostName() const
{
if (m_sHostName.length() == 0)
{
Expand Down Expand Up @@ -765,7 +765,7 @@ QString UPnpDevice::GetUDN(void) const
return m_sUDN;
}

void UPnpDevice::toMap(InfoMap &map)
void UPnpDevice::toMap(InfoMap &map) const
{
map["name"] = m_sFriendlyName;
map["modelname"] = m_sModelName;
Expand Down
4 changes: 2 additions & 2 deletions mythtv/libs/libmythupnp/upnpdevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ class UPNP_PUBLIC UPnpDevice

QString GetUDN(void) const;

void toMap(InfoMap &map);
void toMap(InfoMap &map) const;

UPnpService GetService(const QString &urn, bool *found = nullptr) const;

Expand Down Expand Up @@ -173,7 +173,7 @@ class UPNP_PUBLIC UPnpDeviceDesc
static QString FormatValue ( const QString &sName, const QString &sValue );
static QString FormatValue ( const QString &sName, int nValue );

QString GetHostName ();
QString GetHostName () const;

public:

Expand Down
4 changes: 2 additions & 2 deletions mythtv/libs/libmythupnp/upnputil.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ class NameValue
inline ~NameValue();

inline void AddAttribute(const QString &name, const QString &value, bool required);
inline QString toXML();
inline QString toXML() const;
};
class NameValues : public QList<NameValue> {};

Expand Down Expand Up @@ -135,7 +135,7 @@ inline void NameValue::AddAttribute(const QString &name, const QString &value,
}


inline QString NameValue::toXML()
inline QString NameValue::toXML() const
{
QString sAttributes;
QString attributeTemplate = " %1=\"%2\"";
Expand Down