28 changes: 14 additions & 14 deletions mythplugins/mythmusic/mythmusic/musiccommon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1181,7 +1181,7 @@ void MusicCommon::customEvent(QEvent *event)
{
QString statusString;

if (event->type() == OutputEvent::Playing)
if (event->type() == OutputEvent::kPlaying)
{
MusicMetadata *curMeta = gPlayer->getCurrentMetadata();
if (curMeta)
Expand Down Expand Up @@ -1214,11 +1214,11 @@ void MusicCommon::customEvent(QEvent *event)
updateVolume();
}
}
else if (event->type() == OutputEvent::Buffering)
else if (event->type() == OutputEvent::kBuffering)
{
statusString = tr("Buffering stream.");
}
else if (event->type() == OutputEvent::Paused)
else if (event->type() == OutputEvent::kPaused)
{
statusString = tr("Stream paused.");

Expand All @@ -1241,7 +1241,7 @@ void MusicCommon::customEvent(QEvent *event)
}
}
}
else if (event->type() == OutputEvent::Info)
else if (event->type() == OutputEvent::kInfo)
{

auto *oe = dynamic_cast<OutputEvent *>(event);
Expand Down Expand Up @@ -1311,7 +1311,7 @@ void MusicCommon::customEvent(QEvent *event)
// TODO only need to update the playlist times here
updatePlaylistStats();
}
else if (event->type() == OutputEvent::Stopped)
else if (event->type() == OutputEvent::kStopped)
{
statusString = tr("Stream stopped.");
if (m_stopButton)
Expand Down Expand Up @@ -1556,7 +1556,7 @@ void MusicCommon::customEvent(QEvent *event)
}
}
}
else if (event->type() == MusicPlayerEvent::TrackChangeEvent)
else if (event->type() == MusicPlayerEvent::kTrackChangeEvent)
{
auto *mpe = dynamic_cast<MusicPlayerEvent *>(event);

Expand Down Expand Up @@ -1605,11 +1605,11 @@ void MusicCommon::customEvent(QEvent *event)
updatePlaylistStats();
updateTrackInfo(gPlayer->getCurrentMetadata());
}
else if (event->type() == MusicPlayerEvent::VolumeChangeEvent)
else if (event->type() == MusicPlayerEvent::kVolumeChangeEvent)
{
updateVolume();
}
else if (event->type() == MusicPlayerEvent::TrackRemovedEvent)
else if (event->type() == MusicPlayerEvent::kTrackRemovedEvent)
{
auto *mpe = dynamic_cast<MusicPlayerEvent *>(event);

Expand Down Expand Up @@ -1652,7 +1652,7 @@ void MusicCommon::customEvent(QEvent *event)
if (m_noTracksText && gPlayer->getCurrentPlaylist())
m_noTracksText->SetVisible((gPlayer->getCurrentPlaylist()->getTrackCount() == 0));
}
else if (event->type() == MusicPlayerEvent::TrackAddedEvent)
else if (event->type() == MusicPlayerEvent::kTrackAddedEvent)
{
auto *mpe = dynamic_cast<MusicPlayerEvent *>(event);

Expand Down Expand Up @@ -1711,14 +1711,14 @@ void MusicCommon::customEvent(QEvent *event)
updatePlaylistStats();
updateTrackInfo(gPlayer->getCurrentMetadata());
}
else if (event->type() == MusicPlayerEvent::AllTracksRemovedEvent)
else if (event->type() == MusicPlayerEvent::kAllTracksRemovedEvent)
{
updateUIPlaylist();
updatePlaylistStats();
updateTrackInfo(nullptr);
}
else if (event->type() == MusicPlayerEvent::MetadataChangedEvent ||
event->type() == MusicPlayerEvent::TrackStatsChangedEvent)
else if (event->type() == MusicPlayerEvent::kMetadataChangedEvent ||
event->type() == MusicPlayerEvent::kTrackStatsChangedEvent)
{
auto *mpe = dynamic_cast<MusicPlayerEvent *>(event);

Expand Down Expand Up @@ -1768,7 +1768,7 @@ void MusicCommon::customEvent(QEvent *event)
if (gPlayer->getNextMetadata() && trackID == gPlayer->getNextMetadata()->ID())
updateTrackInfo(gPlayer->getCurrentMetadata());
}
else if (event->type() == MusicPlayerEvent::AlbumArtChangedEvent)
else if (event->type() == MusicPlayerEvent::kAlbumArtChangedEvent)
{
auto *mpe = dynamic_cast<MusicPlayerEvent *>(event);

Expand Down Expand Up @@ -1807,7 +1807,7 @@ void MusicCommon::customEvent(QEvent *event)
if (gPlayer->getCurrentMetadata() && trackID == gPlayer->getCurrentMetadata()->ID())
updateTrackInfo(gPlayer->getCurrentMetadata());
}
else if (event->type() == MusicPlayerEvent::TrackUnavailableEvent)
else if (event->type() == MusicPlayerEvent::kTrackUnavailableEvent)
{
auto *mpe = dynamic_cast<MusicPlayerEvent *>(event);

Expand Down
76 changes: 38 additions & 38 deletions mythplugins/mythmusic/mythmusic/musicplayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,18 +39,18 @@ QString gCDdevice = "";

////////////////////////////////////////////////////////////////

QEvent::Type MusicPlayerEvent::TrackChangeEvent = (QEvent::Type) QEvent::registerEventType();
QEvent::Type MusicPlayerEvent::VolumeChangeEvent = (QEvent::Type) QEvent::registerEventType();
QEvent::Type MusicPlayerEvent::TrackAddedEvent = (QEvent::Type) QEvent::registerEventType();
QEvent::Type MusicPlayerEvent::TrackRemovedEvent = (QEvent::Type) QEvent::registerEventType();
QEvent::Type MusicPlayerEvent::TrackUnavailableEvent = (QEvent::Type) QEvent::registerEventType();
QEvent::Type MusicPlayerEvent::AllTracksRemovedEvent = (QEvent::Type) QEvent::registerEventType();
QEvent::Type MusicPlayerEvent::MetadataChangedEvent = (QEvent::Type) QEvent::registerEventType();
QEvent::Type MusicPlayerEvent::TrackStatsChangedEvent = (QEvent::Type) QEvent::registerEventType();
QEvent::Type MusicPlayerEvent::AlbumArtChangedEvent = (QEvent::Type) QEvent::registerEventType();
QEvent::Type MusicPlayerEvent::CDChangedEvent = (QEvent::Type) QEvent::registerEventType();
QEvent::Type MusicPlayerEvent::PlaylistChangedEvent = (QEvent::Type) QEvent::registerEventType();
QEvent::Type MusicPlayerEvent::PlayedTracksChangedEvent = (QEvent::Type) QEvent::registerEventType();
const QEvent::Type MusicPlayerEvent::kTrackChangeEvent = (QEvent::Type) QEvent::registerEventType();
const QEvent::Type MusicPlayerEvent::kVolumeChangeEvent = (QEvent::Type) QEvent::registerEventType();
const QEvent::Type MusicPlayerEvent::kTrackAddedEvent = (QEvent::Type) QEvent::registerEventType();
const QEvent::Type MusicPlayerEvent::kTrackRemovedEvent = (QEvent::Type) QEvent::registerEventType();
const QEvent::Type MusicPlayerEvent::kTrackUnavailableEvent = (QEvent::Type) QEvent::registerEventType();
const QEvent::Type MusicPlayerEvent::kAllTracksRemovedEvent = (QEvent::Type) QEvent::registerEventType();
const QEvent::Type MusicPlayerEvent::kMetadataChangedEvent = (QEvent::Type) QEvent::registerEventType();
const QEvent::Type MusicPlayerEvent::kTrackStatsChangedEvent = (QEvent::Type) QEvent::registerEventType();
const QEvent::Type MusicPlayerEvent::kAlbumArtChangedEvent = (QEvent::Type) QEvent::registerEventType();
const QEvent::Type MusicPlayerEvent::kCDChangedEvent = (QEvent::Type) QEvent::registerEventType();
const QEvent::Type MusicPlayerEvent::kPlaylistChangedEvent = (QEvent::Type) QEvent::registerEventType();
const QEvent::Type MusicPlayerEvent::kPlayedTracksChangedEvent = (QEvent::Type) QEvent::registerEventType();

MusicPlayer::MusicPlayer(QObject *parent)
:QObject(parent)
Expand Down Expand Up @@ -277,7 +277,7 @@ void MusicPlayer::stop(bool stopAll)

// because we don't actually stop the audio output we have to fake a Stopped
// event so any listeners can act on it
OutputEvent oe(OutputEvent::Stopped);
OutputEvent oe(OutputEvent::kStopped);
dispatch(oe);

gCoreContext->emitTVPlaybackStopped();
Expand Down Expand Up @@ -545,12 +545,12 @@ void MusicPlayer::StopPlayback(void)
void MusicPlayer::customEvent(QEvent *event)
{
// handle decoderHandler events
if (event->type() == DecoderHandlerEvent::Ready)
if (event->type() == DecoderHandlerEvent::kReady)
{
m_errorCount = 0;
decoderHandlerReady();
}
else if (event->type() == DecoderHandlerEvent::Meta)
else if (event->type() == DecoderHandlerEvent::kMeta)
{
auto *dhe = dynamic_cast<DecoderHandlerEvent*>(event);
if (!dhe)
Expand Down Expand Up @@ -589,11 +589,11 @@ void MusicPlayer::customEvent(QEvent *event)
}

// tell any listeners we've added a new track to the played list
MusicPlayerEvent me(MusicPlayerEvent::PlayedTracksChangedEvent, mdata->ID());
MusicPlayerEvent me(MusicPlayerEvent::kPlayedTracksChangedEvent, mdata->ID());
dispatch(me);
}
// handle MythEvent events
else if (event->type() == MythEvent::MythEventMessage)
else if (event->type() == MythEvent::kMythEventMessage)
{
auto *me = dynamic_cast<MythEvent*>(event);
if (!me)
Expand Down Expand Up @@ -798,7 +798,7 @@ void MusicPlayer::customEvent(QEvent *event)
}
}

if (event->type() == OutputEvent::Error)
if (event->type() == OutputEvent::kError)
{
auto *aoe = dynamic_cast<OutputEvent *>(event);

Expand All @@ -820,7 +820,7 @@ void MusicPlayer::customEvent(QEvent *event)
stop(true);
}
}
else if (event->type() == DecoderEvent::Error)
else if (event->type() == DecoderEvent::kError)
{
auto *dxe = dynamic_cast<DecoderEvent *>(event);

Expand All @@ -842,7 +842,7 @@ void MusicPlayer::customEvent(QEvent *event)
stop(true);
}
}
else if (event->type() == DecoderHandlerEvent::Error)
else if (event->type() == DecoderHandlerEvent::kError)
{
auto *dhe = dynamic_cast<DecoderHandlerEvent*>(event);

Expand All @@ -864,7 +864,7 @@ void MusicPlayer::customEvent(QEvent *event)
stop(true);
}
}
else if (event->type() == OutputEvent::Info)
else if (event->type() == OutputEvent::kInfo)
{
auto *oe = dynamic_cast<OutputEvent*>(event);

Expand Down Expand Up @@ -899,7 +899,7 @@ void MusicPlayer::customEvent(QEvent *event)
}
}
}
else if (event->type() == DecoderEvent::Finished)
else if (event->type() == DecoderEvent::kFinished)
{
if (m_oneshotMetadata)
{
Expand All @@ -923,17 +923,17 @@ void MusicPlayer::customEvent(QEvent *event)
gPlayer->sendMetadataChangedEvent(getCurrentMetadata()->ID());

// this will force the playlist stats to update
MusicPlayerEvent me(MusicPlayerEvent::TrackChangeEvent, m_currentTrack);
MusicPlayerEvent me(MusicPlayerEvent::kTrackChangeEvent, m_currentTrack);
dispatch(me);
}

nextAuto();
}
}
else if (event->type() == DecoderEvent::Stopped)
else if (event->type() == DecoderEvent::kStopped)
{
}
else if (event->type() == DecoderHandlerEvent::BufferStatus)
else if (event->type() == DecoderHandlerEvent::kBufferStatus)
{
auto *dhe = dynamic_cast<DecoderHandlerEvent*>(event);
if (!dhe)
Expand Down Expand Up @@ -1330,37 +1330,37 @@ void MusicPlayer::decSpeed()

void MusicPlayer::sendVolumeChangedEvent(void)
{
MusicPlayerEvent me(MusicPlayerEvent::VolumeChangeEvent, getVolume(), isMuted());
MusicPlayerEvent me(MusicPlayerEvent::kVolumeChangeEvent, getVolume(), isMuted());
dispatch(me);
}

void MusicPlayer::sendMetadataChangedEvent(int trackID)
{
MusicPlayerEvent me(MusicPlayerEvent::MetadataChangedEvent, trackID);
MusicPlayerEvent me(MusicPlayerEvent::kMetadataChangedEvent, trackID);
dispatch(me);
}

void MusicPlayer::sendTrackStatsChangedEvent(int trackID)
{
MusicPlayerEvent me(MusicPlayerEvent::TrackStatsChangedEvent, trackID);
MusicPlayerEvent me(MusicPlayerEvent::kTrackStatsChangedEvent, trackID);
dispatch(me);
}

void MusicPlayer::sendAlbumArtChangedEvent(int trackID)
{
MusicPlayerEvent me(MusicPlayerEvent::AlbumArtChangedEvent, trackID);
MusicPlayerEvent me(MusicPlayerEvent::kAlbumArtChangedEvent, trackID);
dispatch(me);
}

void MusicPlayer::sendTrackUnavailableEvent(int trackID)
{
MusicPlayerEvent me(MusicPlayerEvent::TrackUnavailableEvent, trackID);
MusicPlayerEvent me(MusicPlayerEvent::kTrackUnavailableEvent, trackID);
dispatch(me);
}

void MusicPlayer::sendCDChangedEvent(void)
{
MusicPlayerEvent me(MusicPlayerEvent::CDChangedEvent, -1);
MusicPlayerEvent me(MusicPlayerEvent::kCDChangedEvent, -1);
dispatch(me);
}

Expand Down Expand Up @@ -1429,25 +1429,25 @@ void MusicPlayer::activePlaylistChanged(int trackID, bool deleted)
{
if (deleted)
{
MusicPlayerEvent me(MusicPlayerEvent::AllTracksRemovedEvent, 0);
MusicPlayerEvent me(MusicPlayerEvent::kAllTracksRemovedEvent, 0);
dispatch(me);
}
else
{
MusicPlayerEvent me(MusicPlayerEvent::TrackAddedEvent, trackID);
MusicPlayerEvent me(MusicPlayerEvent::kTrackAddedEvent, trackID);
dispatch(me);
}
}
else
{
if (deleted)
{
MusicPlayerEvent me(MusicPlayerEvent::TrackRemovedEvent, trackID);
MusicPlayerEvent me(MusicPlayerEvent::kTrackRemovedEvent, trackID);
dispatch(me);
}
else
{
MusicPlayerEvent me(MusicPlayerEvent::TrackAddedEvent, trackID);
MusicPlayerEvent me(MusicPlayerEvent::kTrackAddedEvent, trackID);
dispatch(me);
}
}
Expand Down Expand Up @@ -1488,7 +1488,7 @@ void MusicPlayer::activePlaylistChanged(int trackID, bool deleted)

void MusicPlayer::playlistChanged(int playlistID)
{
MusicPlayerEvent me(MusicPlayerEvent::PlaylistChangedEvent, playlistID);
MusicPlayerEvent me(MusicPlayerEvent::kPlaylistChangedEvent, playlistID);
dispatch(me);
}

Expand Down Expand Up @@ -1576,7 +1576,7 @@ void MusicPlayer::decoderHandlerReady(void)
}

// tell any listeners we've started playing a new track
MusicPlayerEvent me(MusicPlayerEvent::TrackChangeEvent, m_currentTrack);
MusicPlayerEvent me(MusicPlayerEvent::kTrackChangeEvent, m_currentTrack);
dispatch(me);
}

Expand Down Expand Up @@ -1634,7 +1634,7 @@ void MusicPlayer::sendNotification(int notificationID, const QString &title, con
map["minm"] = author;
map["asal"] = desc;

auto *n = new MythImageNotification(MythNotification::Info, image, map);
auto *n = new MythImageNotification(MythNotification::kInfo, image, map);

n->SetId(notificationID);
n->SetParent(this);
Expand Down
24 changes: 12 additions & 12 deletions mythplugins/mythmusic/mythmusic/musicplayer.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,18 +36,18 @@ class MusicPlayerEvent : public MythEvent
uint m_volume {0};
bool m_isMuted {false};

static Type TrackChangeEvent;
static Type VolumeChangeEvent;
static Type TrackAddedEvent;
static Type TrackRemovedEvent;
static Type TrackUnavailableEvent;
static Type AllTracksRemovedEvent;
static Type MetadataChangedEvent;
static Type TrackStatsChangedEvent;
static Type AlbumArtChangedEvent;
static Type CDChangedEvent;
static Type PlaylistChangedEvent;
static Type PlayedTracksChangedEvent;
static const Type kTrackChangeEvent;
static const Type kVolumeChangeEvent;
static const Type kTrackAddedEvent;
static const Type kTrackRemovedEvent;
static const Type kTrackUnavailableEvent;
static const Type kAllTracksRemovedEvent;
static const Type kMetadataChangedEvent;
static const Type kTrackStatsChangedEvent;
static const Type kAlbumArtChangedEvent;
static const Type kCDChangedEvent;
static const Type kPlaylistChangedEvent;
static const Type kPlayedTracksChangedEvent;

// No implicit copying.
protected:
Expand Down
16 changes: 8 additions & 8 deletions mythplugins/mythmusic/mythmusic/playlisteditorview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -176,29 +176,29 @@ bool PlaylistEditorView::Create(void)

void PlaylistEditorView::customEvent(QEvent *event)
{
if ((event->type() == MusicPlayerEvent::MetadataChangedEvent) ||
(event->type() == MusicPlayerEvent::AlbumArtChangedEvent))
if ((event->type() == MusicPlayerEvent::kMetadataChangedEvent) ||
(event->type() == MusicPlayerEvent::kAlbumArtChangedEvent))
{ // NOLINT(bugprone-branch-clone)
// TODO: this could be more efficient
reloadTree();
}
else if ((event->type() == MusicPlayerEvent::TrackRemovedEvent) ||
(event->type() == MusicPlayerEvent::TrackAddedEvent) ||
(event->type() == MusicPlayerEvent::AllTracksRemovedEvent))
else if ((event->type() == MusicPlayerEvent::kTrackRemovedEvent) ||
(event->type() == MusicPlayerEvent::kTrackAddedEvent) ||
(event->type() == MusicPlayerEvent::kAllTracksRemovedEvent))
{
updateSelectedTracks();
}
else if (event->type() == MusicPlayerEvent::PlaylistChangedEvent)
else if (event->type() == MusicPlayerEvent::kPlaylistChangedEvent)
{
//TODO should just update the relevent playlist here
reloadTree();
}
else if (event->type() == MusicPlayerEvent::CDChangedEvent)
else if (event->type() == MusicPlayerEvent::kCDChangedEvent)
{
//TODO should just update the cd node
reloadTree();
}
else if (event->type() == MythEvent::MythEventMessage)
else if (event->type() == MythEvent::kMythEventMessage)
{
auto *me = dynamic_cast<MythEvent*>(event);
if (!me)
Expand Down
10 changes: 5 additions & 5 deletions mythplugins/mythmusic/mythmusic/searchview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ void SearchView::customEvent(QEvent *event)
{
bool handled = false;

if (event->type() == MusicPlayerEvent::TrackRemovedEvent ||
event->type() == MusicPlayerEvent::TrackAddedEvent)
if (event->type() == MusicPlayerEvent::kTrackRemovedEvent ||
event->type() == MusicPlayerEvent::kTrackAddedEvent)
{
auto *mpe = dynamic_cast<MusicPlayerEvent *>(event);

Expand Down Expand Up @@ -113,15 +113,15 @@ void SearchView::customEvent(QEvent *event)
{
m_playTrack = false;

if (event->type() == MusicPlayerEvent::TrackAddedEvent)
if (event->type() == MusicPlayerEvent::kTrackAddedEvent)
{
// make the added track current and play it
m_currentPlaylist->SetItemCurrent(m_currentPlaylist->GetCount() - 1);
playlistItemClicked(m_currentPlaylist->GetItemCurrent());
}
}
}
else if (event->type() == MusicPlayerEvent::AllTracksRemovedEvent)
else if (event->type() == MusicPlayerEvent::kAllTracksRemovedEvent)
{
for (int x = 0; x < m_tracksList->GetCount(); x++)
{
Expand All @@ -130,7 +130,7 @@ void SearchView::customEvent(QEvent *event)
item->DisplayState("off", "selectedstate");
}
}
else if (event->type() == MusicPlayerEvent::MetadataChangedEvent)
else if (event->type() == MusicPlayerEvent::kMetadataChangedEvent)
{
auto *mpe = dynamic_cast<MusicPlayerEvent *>(event);

Expand Down
18 changes: 9 additions & 9 deletions mythplugins/mythmusic/mythmusic/streamview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ void StreamView::customEvent(QEvent *event)
{
bool handled = true;

if (event->type() == MusicPlayerEvent::PlayedTracksChangedEvent)
if (event->type() == MusicPlayerEvent::kPlayedTracksChangedEvent)
{
if (!gPlayer->getPlayedTracksList().isEmpty())
updateTrackInfo(gPlayer->getCurrentMetadata());
Expand All @@ -127,7 +127,7 @@ void StreamView::customEvent(QEvent *event)
m_playedTracksList->SetItemCurrent(item);
}
}
else if (event->type() == MusicPlayerEvent::TrackChangeEvent)
else if (event->type() == MusicPlayerEvent::kTrackChangeEvent)
{
auto *mpe = dynamic_cast<MusicPlayerEvent *>(event);

Expand Down Expand Up @@ -172,7 +172,7 @@ void StreamView::customEvent(QEvent *event)

updateTrackInfo(gPlayer->getCurrentMetadata());
}
else if (event->type() == OutputEvent::Playing)
else if (event->type() == OutputEvent::kPlaying)
{
if (gPlayer->isPlaying())
{
Expand All @@ -190,7 +190,7 @@ void StreamView::customEvent(QEvent *event)
// pass it on to the default handler in MusicCommon
handled = false;
}
else if (event->type() == OutputEvent::Stopped)
else if (event->type() == OutputEvent::kStopped)
{
if (m_streamList)
{
Expand All @@ -205,10 +205,10 @@ void StreamView::customEvent(QEvent *event)
// pass it on to the default handler in MusicCommon
handled = false;
}
else if (event->type() == OutputEvent::Buffering)
else if (event->type() == OutputEvent::kBuffering)
{
}
else if (event->type() == MythEvent::MythEventMessage)
else if (event->type() == MythEvent::kMythEventMessage)
{
auto *me = dynamic_cast<MythEvent *>(event);
if (me == nullptr)
Expand Down Expand Up @@ -251,7 +251,7 @@ void StreamView::customEvent(QEvent *event)
}
}
}
else if (event->type() == DecoderHandlerEvent::OperationStart)
else if (event->type() == DecoderHandlerEvent::kOperationStart)
{
auto *dhe = dynamic_cast<DecoderHandlerEvent*>(event);
if (!dhe)
Expand All @@ -261,7 +261,7 @@ void StreamView::customEvent(QEvent *event)
m_bufferStatus->SetText(*dhe->getMessage());
}
}
else if (event->type() == DecoderHandlerEvent::BufferStatus)
else if (event->type() == DecoderHandlerEvent::kBufferStatus)
{
auto *dhe = dynamic_cast<DecoderHandlerEvent*>(event);
if (!dhe)
Expand All @@ -283,7 +283,7 @@ void StreamView::customEvent(QEvent *event)
m_bufferProgress->SetUsed(available);
}
}
else if (event->type() == DecoderHandlerEvent::OperationStop)
else if (event->type() == DecoderHandlerEvent::kOperationStop)
{
if (m_bufferStatus)
m_bufferStatus->Reset();
Expand Down
4 changes: 2 additions & 2 deletions mythplugins/mythmusic/mythmusic/visualizerview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ bool VisualizerView::Create(void)

void VisualizerView::customEvent(QEvent *event)
{
if (event->type() == MusicPlayerEvent::TrackChangeEvent ||
event->type() == MusicPlayerEvent::PlayedTracksChangedEvent)
if (event->type() == MusicPlayerEvent::kTrackChangeEvent ||
event->type() == MusicPlayerEvent::kPlayedTracksChangedEvent)
showTrackInfoPopup();

MusicCommon::customEvent(event);
Expand Down
2 changes: 1 addition & 1 deletion mythplugins/mythnetvision/mythnetvision/netbase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ void NetBase::DoDeleteVideo(bool remove)

void NetBase::customEvent(QEvent *event)
{
if (event->type() == MythEvent::MythEventMessage)
if (event->type() == MythEvent::kMythEventMessage)
{
auto *me = dynamic_cast<MythEvent *>(event);
if (me == nullptr)
Expand Down
2 changes: 1 addition & 1 deletion mythplugins/mythnews/mythnews/newssite.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ std::chrono::minutes NewsSite::timeSinceLastUpdate(void) const

void NewsSite::customEvent(QEvent *event)
{
if (event->type() == MythEvent::MythEventMessage)
if (event->type() == MythEvent::kMythEventMessage)
{
auto *me = dynamic_cast<MythEvent *>(event);
if (me == nullptr)
Expand Down
2 changes: 1 addition & 1 deletion mythplugins/mythzoneminder/mythzoneminder/zmclient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -961,7 +961,7 @@ void ZMClient::saveNotificationMonitors(void)

void ZMClient::customEvent (QEvent* event)
{
if (event->type() == MythEvent::MythEventMessage)
if (event->type() == MythEvent::kMythEventMessage)
{
auto *me = dynamic_cast<MythEvent*>(event);
if (!me)
Expand Down
2 changes: 1 addition & 1 deletion mythplugins/mythzoneminder/mythzoneminder/zmminiplayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ bool ZMMiniPlayer::Create(void)

void ZMMiniPlayer::customEvent (QEvent* event)
{
if (event->type() == MythEvent::MythEventMessage)
if (event->type() == MythEvent::kMythEventMessage)
{
auto *me = dynamic_cast<MythEvent*>(event);
if (!me)
Expand Down
6 changes: 3 additions & 3 deletions mythtv/libs/libmyth/audio/audiooutputbase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1663,7 +1663,7 @@ void AudioOutputBase::OutputAudioLoop(void)
if (!m_actuallyPaused)
{
VBAUDIO("OutputAudioLoop: audio paused");
OutputEvent e(OutputEvent::Paused);
OutputEvent e(OutputEvent::kPaused);
dispatch(e);
m_wasPaused = true;
}
Expand All @@ -1678,7 +1678,7 @@ void AudioOutputBase::OutputAudioLoop(void)
if (m_wasPaused)
{
VBAUDIO("OutputAudioLoop: Play Event");
OutputEvent e(OutputEvent::Playing);
OutputEvent e(OutputEvent::kPlaying);
dispatch(e);
m_wasPaused = false;
}
Expand Down Expand Up @@ -1728,7 +1728,7 @@ void AudioOutputBase::OutputAudioLoop(void)
delete[] zeros;
delete[] fragment;
VBAUDIO("OutputAudioLoop: Stop Event");
OutputEvent e(OutputEvent::Stopped);
OutputEvent e(OutputEvent::kStopped);
dispatch(e);
}

Expand Down
6 changes: 3 additions & 3 deletions mythtv/libs/libmyth/audio/audiooutputjack.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ void AudioOutputJACK::CloseDevice()
}

VBAUDIO("Jack: Stop Event");
OutputEvent e(OutputEvent::Stopped);
OutputEvent e(OutputEvent::kStopped);
dispatch(e);
}

Expand Down Expand Up @@ -383,7 +383,7 @@ int AudioOutputJACK::JackCallback(jack_nframes_t nframes)
if (!m_actuallyPaused)
{
VBAUDIO("JackCallback: audio paused");
OutputEvent e(OutputEvent::Paused);
OutputEvent e(OutputEvent::kPaused);
dispatch(e);
m_wasPaused = true;
}
Expand All @@ -395,7 +395,7 @@ int AudioOutputJACK::JackCallback(jack_nframes_t nframes)
if (m_wasPaused)
{
VBAUDIO("JackCallback: Play Event");
OutputEvent e(OutputEvent::Playing);
OutputEvent e(OutputEvent::kPlaying);
dispatch(e);
m_wasPaused = false;
}
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmyth/backendselect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ bool BackendSelection::TryDBfromURL(const QString &error, const QString& URL)

void BackendSelection::customEvent(QEvent *event)
{
if (event->type() == MythEvent::MythEventMessage)
if (event->type() == MythEvent::kMythEventMessage)
{
auto *me = dynamic_cast<MythEvent *>(event);
if (me == nullptr)
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmyth/mythcontext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1371,7 +1371,7 @@ bool MythContextPrivate::UPnPconnect(const DeviceLocation *backend,

bool MythContextPrivate::event(QEvent *e)
{
if (e->type() == MythEvent::MythEventMessage)
if (e->type() == MythEvent::kMythEventMessage)
{
if (m_disableeventpopup)
return true;
Expand Down
12 changes: 6 additions & 6 deletions mythtv/libs/libmyth/output.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@

class QObject;

QEvent::Type OutputEvent::Playing =
const QEvent::Type OutputEvent::kPlaying =
(QEvent::Type) QEvent::registerEventType();
QEvent::Type OutputEvent::Buffering =
const QEvent::Type OutputEvent::kBuffering =
(QEvent::Type) QEvent::registerEventType();
QEvent::Type OutputEvent::Info =
const QEvent::Type OutputEvent::kInfo =
(QEvent::Type) QEvent::registerEventType();
QEvent::Type OutputEvent::Paused =
const QEvent::Type OutputEvent::kPaused =
(QEvent::Type) QEvent::registerEventType();
QEvent::Type OutputEvent::Stopped =
const QEvent::Type OutputEvent::kStopped =
(QEvent::Type) QEvent::registerEventType();
QEvent::Type OutputEvent::Error =
const QEvent::Type OutputEvent::kError =
(QEvent::Type) QEvent::registerEventType();

void OutputListeners::error(const QString &e)
Expand Down
16 changes: 8 additions & 8 deletions mythtv/libs/libmyth/output.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ class MPUBLIC OutputEvent : public MythEvent
explicit OutputEvent(Type type) :
MythEvent(type) {}
OutputEvent(std::chrono::seconds s, unsigned long w, int b, int f, int p, int c) :
MythEvent(Info), m_elaspedSeconds(s), m_writtenBytes(w),
MythEvent(kInfo), m_elaspedSeconds(s), m_writtenBytes(w),
m_brate(b), m_freq(f), m_prec(p), m_chan(c) {}
explicit OutputEvent(const QString &e) :
MythEvent(Error)
MythEvent(kError)
{
QByteArray tmp = e.toUtf8();
m_errorMsg = new QString(tmp.constData());
Expand All @@ -60,12 +60,12 @@ class MPUBLIC OutputEvent : public MythEvent
MythEvent *clone(void) const override // MythEvent
{ return new OutputEvent(*this); }

static Type Playing;
static Type Buffering;
static Type Info;
static Type Paused;
static Type Stopped;
static Type Error;
static const Type kPlaying;
static const Type kBuffering;
static const Type kInfo;
static const Type kPaused;
static const Type kStopped;
static const Type kError;

private:
OutputEvent(const OutputEvent &o) : MythEvent(o),
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythbase/housekeeper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -832,7 +832,7 @@ void HouseKeeper::StartThread(void)

void HouseKeeper::customEvent(QEvent *e)
{
if (e->type() == MythEvent::MythEventMessage)
if (e->type() == MythEvent::kMythEventMessage)
{
auto *me = dynamic_cast<MythEvent*>(e);
if (me == nullptr)
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythbase/http/mythwebsocketevent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ bool MythWebSocketEvent::HandleTextMessage(const StringPayload& Text)

void MythWebSocketEvent::customEvent(QEvent* event)
{
if (event->type() == MythEvent::MythEventMessage)
if (event->type() == MythEvent::kMythEventMessage)
{
if (!m_sendEvents)
return;
Expand Down
26 changes: 13 additions & 13 deletions mythtv/libs/libmythbase/mythevent.cpp
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
#include "mythevent.h"
#include "mythlogging.h"

QEvent::Type MythEvent::MythEventMessage =
const QEvent::Type MythEvent::kMythEventMessage =
(QEvent::Type) QEvent::registerEventType();
QEvent::Type MythEvent::MythUserMessage =
const QEvent::Type MythEvent::kMythUserMessage =
(QEvent::Type) QEvent::registerEventType();
QEvent::Type MythEvent::kUpdateTvProgressEventType =
const QEvent::Type MythEvent::kUpdateTvProgressEventType =
(QEvent::Type) QEvent::registerEventType();
QEvent::Type MythEvent::kExitToMainMenuEventType =
const QEvent::Type MythEvent::kExitToMainMenuEventType =
(QEvent::Type) QEvent::registerEventType();
QEvent::Type MythEvent::kMythPostShowEventType =
const QEvent::Type MythEvent::kMythPostShowEventType =
(QEvent::Type) QEvent::registerEventType();
QEvent::Type MythEvent::kPushDisableDrawingEventType =
const QEvent::Type MythEvent::kPushDisableDrawingEventType =
(QEvent::Type) QEvent::registerEventType();
QEvent::Type MythEvent::kPopDisableDrawingEventType =
const QEvent::Type MythEvent::kPopDisableDrawingEventType =
(QEvent::Type) QEvent::registerEventType();
QEvent::Type MythEvent::kLockInputDevicesEventType =
const QEvent::Type MythEvent::kLockInputDevicesEventType =
(QEvent::Type) QEvent::registerEventType();
QEvent::Type MythEvent::kUnlockInputDevicesEventType =
const QEvent::Type MythEvent::kUnlockInputDevicesEventType =
(QEvent::Type) QEvent::registerEventType();
QEvent::Type MythEvent::kUpdateBrowseInfoEventType =
const QEvent::Type MythEvent::kUpdateBrowseInfoEventType =
(QEvent::Type) QEvent::registerEventType();
QEvent::Type MythEvent::kDisableUDPListenerEventType =
const QEvent::Type MythEvent::kDisableUDPListenerEventType =
(QEvent::Type) QEvent::registerEventType();
QEvent::Type MythEvent::kEnableUDPListenerEventType =
const QEvent::Type MythEvent::kEnableUDPListenerEventType =
(QEvent::Type) QEvent::registerEventType();
QEvent::Type ExternalKeycodeEvent::kEventType =
const QEvent::Type ExternalKeycodeEvent::kEventType =
(QEvent::Type) QEvent::registerEventType();

// Force this class to have a vtable so that dynamic_cast works.
Expand Down
32 changes: 16 additions & 16 deletions mythtv/libs/libmythbase/mythevent.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,23 +37,23 @@ class MBASE_PUBLIC MythEvent : public QEvent

// lmessage is passed by value for thread safety reasons per DanielK
explicit MythEvent(QString lmessage)
: QEvent(MythEventMessage),
: QEvent(kMythEventMessage),
m_message(::std::move(lmessage)),
m_extradata("empty")
{
}

// lmessage is passed by value for thread safety reasons per DanielK
MythEvent(QString lmessage, QStringList lextradata)
: QEvent(MythEventMessage),
: QEvent(kMythEventMessage),
m_message(::std::move(lmessage)),
m_extradata(std::move(lextradata))
{
}

// lmessage is passed by value for thread safety reasons per DanielK
MythEvent(QString lmessage, const QString& lextradata)
: QEvent(MythEventMessage),
: QEvent(kMythEventMessage),
m_message(::std::move(lmessage)),
m_extradata(lextradata)
{
Expand All @@ -76,18 +76,18 @@ class MBASE_PUBLIC MythEvent : public QEvent
{ return new MythEvent(type(), m_message, m_extradata); }
#endif

static Type MythEventMessage;
static Type MythUserMessage;
static Type kUpdateTvProgressEventType;
static Type kExitToMainMenuEventType;
static Type kMythPostShowEventType;
static Type kPushDisableDrawingEventType;
static Type kPopDisableDrawingEventType;
static Type kLockInputDevicesEventType;
static Type kUnlockInputDevicesEventType;
static Type kUpdateBrowseInfoEventType;
static Type kDisableUDPListenerEventType;
static Type kEnableUDPListenerEventType;
static const Type kMythEventMessage;
static const Type kMythUserMessage;
static const Type kUpdateTvProgressEventType;
static const Type kExitToMainMenuEventType;
static const Type kMythPostShowEventType;
static const Type kPushDisableDrawingEventType;
static const Type kPopDisableDrawingEventType;
static const Type kLockInputDevicesEventType;
static const Type kUnlockInputDevicesEventType;
static const Type kUpdateBrowseInfoEventType;
static const Type kDisableUDPListenerEventType;
static const Type kEnableUDPListenerEventType;

// No implicit copying.
protected:
Expand All @@ -110,7 +110,7 @@ class MBASE_PUBLIC ExternalKeycodeEvent : public QEvent

int getKeycode() const { return m_keycode; }

static Type kEventType;
static const Type kEventType;

private:
int m_keycode;
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythbase/mythmedia.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ const std::array<const QString,3> MythMediaDevice::kMediaErrorStrings
"MEDIAERR_UNSUPPORTED"
};

QEvent::Type MythMediaEvent::kEventType =
const QEvent::Type MythMediaEvent::kEventType =
(QEvent::Type) QEvent::registerEventType();

// Force this class to have a vtable so that dynamic_cast works.
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythbase/mythmedia.h
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ class MBASE_PUBLIC MythMediaEvent : public QEvent
MythMediaStatus getOldStatus(void) const { return m_oldStatus; }
MythMediaDevice* getDevice(void) { return m_device.isNull() ? nullptr : m_device.data(); }

static Type kEventType;
static const Type kEventType;

protected:
MythMediaStatus m_oldStatus;
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythmetadata/lyricsdata.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ QString LyricsData::createLyricsXML(void)

void LyricsData::customEvent(QEvent *event)
{
if (event->type() == MythEvent::MythEventMessage)
if (event->type() == MythEvent::kMythEventMessage)
{
auto *me = dynamic_cast<MythEvent*>(event);
if (!me)
Expand Down
4 changes: 2 additions & 2 deletions mythtv/libs/libmythmetadata/metadatadownload.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
#include "metadatadownload.h"
#include "metadatafactory.h"

QEvent::Type MetadataLookupEvent::kEventType =
const QEvent::Type MetadataLookupEvent::kEventType =
(QEvent::Type) QEvent::registerEventType();

QEvent::Type MetadataLookupFailure::kEventType =
const QEvent::Type MetadataLookupFailure::kEventType =
(QEvent::Type) QEvent::registerEventType();

MetadataDownload::~MetadataDownload()
Expand Down
4 changes: 2 additions & 2 deletions mythtv/libs/libmythmetadata/metadatadownload.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class META_PUBLIC MetadataLookupEvent : public QEvent

MetadataLookupList m_lookupList;

static Type kEventType;
static const Type kEventType;
};

class META_PUBLIC MetadataLookupFailure : public QEvent
Expand All @@ -29,7 +29,7 @@ class META_PUBLIC MetadataLookupFailure : public QEvent

MetadataLookupList m_lookupList;

static Type kEventType;
static const Type kEventType;
};

class META_PUBLIC MetadataDownload : public MThread
Expand Down
8 changes: 4 additions & 4 deletions mythtv/libs/libmythmetadata/metadatafactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
#include "videometadata.h"


QEvent::Type MetadataFactoryNoResult::kEventType =
const QEvent::Type MetadataFactoryNoResult::kEventType =
(QEvent::Type) QEvent::registerEventType();

MetadataFactoryNoResult::~MetadataFactoryNoResult()
Expand All @@ -45,7 +45,7 @@ MetadataFactoryNoResult::~MetadataFactoryNoResult()
}
}

QEvent::Type MetadataFactorySingleResult::kEventType =
const QEvent::Type MetadataFactorySingleResult::kEventType =
(QEvent::Type) QEvent::registerEventType();

MetadataFactorySingleResult::~MetadataFactorySingleResult()
Expand All @@ -57,7 +57,7 @@ MetadataFactorySingleResult::~MetadataFactorySingleResult()
}
}

QEvent::Type MetadataFactoryMultiResult::kEventType =
const QEvent::Type MetadataFactoryMultiResult::kEventType =
(QEvent::Type) QEvent::registerEventType();

// Force this class to have a vtable so that dynamic_cast works.
Expand All @@ -66,7 +66,7 @@ MetadataFactoryMultiResult::~MetadataFactoryMultiResult()
{
}

QEvent::Type MetadataFactoryVideoChanges::kEventType =
const QEvent::Type MetadataFactoryVideoChanges::kEventType =
(QEvent::Type) QEvent::registerEventType();

// Force this class to have a vtable so that dynamic_cast works.
Expand Down
8 changes: 4 additions & 4 deletions mythtv/libs/libmythmetadata/metadatafactory.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class META_PUBLIC MetadataFactoryMultiResult : public QEvent

MetadataLookupList m_results;

static Type kEventType;
static const Type kEventType;
};

class META_PUBLIC MetadataFactorySingleResult : public QEvent
Expand All @@ -44,7 +44,7 @@ class META_PUBLIC MetadataFactorySingleResult : public QEvent

MetadataLookup *m_result {nullptr};

static Type kEventType;
static const Type kEventType;
};

class META_PUBLIC MetadataFactoryNoResult : public QEvent
Expand All @@ -62,7 +62,7 @@ class META_PUBLIC MetadataFactoryNoResult : public QEvent

MetadataLookup *m_result {nullptr};

static Type kEventType;
static const Type kEventType;
};

class META_PUBLIC MetadataFactoryVideoChanges : public QEvent
Expand All @@ -79,7 +79,7 @@ class META_PUBLIC MetadataFactoryVideoChanges : public QEvent
QList<int> m_moved; // intids moved to new filename
QList<int> m_deleted; // orphaned/deleted intids

static Type kEventType;
static const Type kEventType;
};

class META_PUBLIC MetadataFactory : public QObject
Expand Down
6 changes: 3 additions & 3 deletions mythtv/libs/libmythmetadata/metadataimagedownload.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@

#include "metadataimagedownload.h"

QEvent::Type ImageDLEvent::kEventType =
const QEvent::Type ImageDLEvent::kEventType =
(QEvent::Type) QEvent::registerEventType();

QEvent::Type ImageDLFailureEvent::kEventType =
const QEvent::Type ImageDLFailureEvent::kEventType =
(QEvent::Type) QEvent::registerEventType();

QEvent::Type ThumbnailDLEvent::kEventType =
const QEvent::Type ThumbnailDLEvent::kEventType =
(QEvent::Type) QEvent::registerEventType();

MetadataImageDownload::~MetadataImageDownload()
Expand Down
6 changes: 3 additions & 3 deletions mythtv/libs/libmythmetadata/metadataimagedownload.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class META_PUBLIC ImageDLEvent : public QEvent

MetadataLookup *m_item {nullptr};

static Type kEventType;
static const Type kEventType;
};

class META_PUBLIC ImageDLFailureEvent : public QEvent
Expand All @@ -64,7 +64,7 @@ class META_PUBLIC ImageDLFailureEvent : public QEvent

MetadataLookup *m_item {nullptr};

static Type kEventType;
static const Type kEventType;
};

class META_PUBLIC ThumbnailDLEvent : public QEvent
Expand All @@ -81,7 +81,7 @@ class META_PUBLIC ThumbnailDLEvent : public QEvent

ThumbnailData *m_thumb {nullptr};

static Type kEventType;
static const Type kEventType;
};

class META_PUBLIC MetadataImageDownload : public MThread
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 @@ -24,7 +24,7 @@
#include "dbaccess.h"
#include "dirscan.h"

QEvent::Type VideoScanChanges::kEventType =
const QEvent::Type VideoScanChanges::kEventType =
(QEvent::Type) QEvent::registerEventType();

namespace
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythmetadata/videoscan.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class META_PUBLIC VideoScanChanges : public QEvent
QList<int> m_moved; // intids moved to new filename
QList<int> m_deleted; // orphaned/deleted intids

static Type kEventType;
static const Type kEventType;
};

class META_PUBLIC VideoScannerThread : public MThread
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ MessageHandler::MessageHandler(void)

void MessageHandler::customEvent(QEvent *e)
{
if (e->type() != MythEvent::MythEventMessage)
if (e->type() != MythEvent::kMythEventMessage)
return;

if (!gCoreContext->IsMasterBackend())
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 @@ -863,7 +863,7 @@ void MythAirplayServer::HandleResponse(APHTTPRequest *req,
GetNotificationCenter()->Register(this);
}
// send full screen display notification
MythImageNotification n(MythNotification::New, image);
MythImageNotification n(MythNotification::kNew, image);
n.SetId(m_connections[session].m_notificationid);
n.SetParent(this);
n.SetFullScreen(true);
Expand Down
4 changes: 2 additions & 2 deletions mythtv/libs/libmythtv/AirPlay/mythraopconnection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1897,12 +1897,12 @@ void MythRAOPConnection::SendNotification(bool update)

if (!update || !m_firstSend)
{
n = new MythMediaNotification(MythNotification::New,
n = new MythMediaNotification(MythNotification::kNew,
image, m_dmap, duration, position);
}
else
{
n = new MythPlaybackNotification(MythNotification::Update,
n = new MythPlaybackNotification(MythNotification::kUpdate,
duration, position);
}
n->SetId(m_id);
Expand Down
22 changes: 11 additions & 11 deletions mythtv/libs/libmythtv/channelscan/channelscanner_cli.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,13 @@

void ChannelScannerCLI::HandleEvent(const ScannerEvent *scanEvent)
{
if ((scanEvent->type() == ScannerEvent::ScanComplete) ||
(scanEvent->type() == ScannerEvent::ScanShutdown) ||
(scanEvent->type() == ScannerEvent::ScanErrored))
if ((scanEvent->type() == ScannerEvent::kScanComplete) ||
(scanEvent->type() == ScannerEvent::kScanShutdown) ||
(scanEvent->type() == ScannerEvent::kScanErrored))
{
std::cout<<std::endl;

if (scanEvent->type() == ScannerEvent::ScanShutdown)
if (scanEvent->type() == ScannerEvent::kScanShutdown)
std::cerr<<"HandleEvent(void) -- scan shutdown"<<std::endl;
else
std::cerr<<"HandleEvent(void) -- scan complete"<<std::endl;
Expand All @@ -56,7 +56,7 @@ void ChannelScannerCLI::HandleEvent(const ScannerEvent *scanEvent)

Teardown();

if (scanEvent->type() == ScannerEvent::ScanErrored)
if (scanEvent->type() == ScannerEvent::kScanErrored)
{
QString error = scanEvent->strValue();
InformUser(error);
Expand All @@ -67,15 +67,15 @@ void ChannelScannerCLI::HandleEvent(const ScannerEvent *scanEvent)
m_done = true;
QCoreApplication::exit(0);
}
else if (scanEvent->type() == ScannerEvent::AppendTextToLog)
else if (scanEvent->type() == ScannerEvent::kAppendTextToLog)
m_statusLastLog = scanEvent->strValue();
else if (scanEvent->type() == ScannerEvent::SetStatusText)
else if (scanEvent->type() == ScannerEvent::kSetStatusText)
m_statusText = scanEvent->strValue();
else if (scanEvent->type() == ScannerEvent::SetPercentComplete)
else if (scanEvent->type() == ScannerEvent::kSetPercentComplete)
m_statusComplete = scanEvent->intValue();
else if (scanEvent->type() == ScannerEvent::SetStatusSignalLock)
else if (scanEvent->type() == ScannerEvent::kSetStatusSignalLock)
m_statusLock = scanEvent->boolValue();
else if (scanEvent->type() == ScannerEvent::SetStatusSignalToNoise)
else if (scanEvent->type() == ScannerEvent::kSetStatusSignalToNoise)
m_statusSnr = scanEvent->intValue() / 65535.0;
#if 0 // THESE_ARE_CURRENTLY_IGNORED
else if (scanEvent->type() == ScannerEvent::SetStatusTitleText)
Expand Down Expand Up @@ -128,7 +128,7 @@ void ChannelScannerCLI::InformUser(const QString &error)
{
LOG(VB_GENERAL, LOG_ERR, LOC + error);
}
post_event(m_scanMonitor, ScannerEvent::ScanComplete, 0);
post_event(m_scanMonitor, ScannerEvent::kScanComplete, 0);
}

void ChannelScannerCLI::Process(const ScanDTVTransportList &_transports)
Expand Down
30 changes: 15 additions & 15 deletions mythtv/libs/libmythtv/channelscan/channelscanner_gui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,24 +55,24 @@ ChannelScannerGUI::~ChannelScannerGUI()
Teardown();
if (m_scanMonitor)
{
post_event(m_scanMonitor, ScannerEvent::ScanShutdown, kCodeRejected);
post_event(m_scanMonitor, ScannerEvent::kScanShutdown, kCodeRejected);
}
}

void ChannelScannerGUI::HandleEvent(const ScannerEvent *scanEvent)
{
if (scanEvent->type() == ScannerEvent::ScanComplete)
if (scanEvent->type() == ScannerEvent::kScanComplete)
{
if (m_scanStage)
m_scanStage->SetScanProgress(1.0);

InformUser(tr("Scan complete"));

// HACK: make channel insertion work after [21644]
post_event(m_scanMonitor, ScannerEvent::ScanShutdown, kCodeAccepted);
post_event(m_scanMonitor, ScannerEvent::kScanShutdown, kCodeAccepted);
}
else if (scanEvent->type() == ScannerEvent::ScanShutdown ||
scanEvent->type() == ScannerEvent::ScanErrored)
else if (scanEvent->type() == ScannerEvent::kScanShutdown ||
scanEvent->type() == ScannerEvent::kScanErrored)
{
ScanDTVTransportList transports;
if (m_sigmonScanner)
Expand All @@ -94,7 +94,7 @@ void ChannelScannerGUI::HandleEvent(const ScannerEvent *scanEvent)

Teardown();

if (scanEvent->type() == ScannerEvent::ScanErrored)
if (scanEvent->type() == ScannerEvent::kScanErrored)
{
QString error = scanEvent->strValue();
InformUser(error);
Expand All @@ -107,7 +107,7 @@ void ChannelScannerGUI::HandleEvent(const ScannerEvent *scanEvent)
Process(transports, success);
}
}
else if (scanEvent->type() == ScannerEvent::AppendTextToLog)
else if (scanEvent->type() == ScannerEvent::kAppendTextToLog)
{
if (m_scanStage)
m_scanStage->AppendLine(scanEvent->strValue());
Expand All @@ -117,19 +117,19 @@ void ChannelScannerGUI::HandleEvent(const ScannerEvent *scanEvent)
if (!m_scanStage)
return;

if (scanEvent->type() == ScannerEvent::SetStatusText)
if (scanEvent->type() == ScannerEvent::kSetStatusText)
m_scanStage->SetStatusText(scanEvent->strValue());
else if (scanEvent->type() == ScannerEvent::SetStatusTitleText)
else if (scanEvent->type() == ScannerEvent::kSetStatusTitleText)
m_scanStage->SetStatusTitleText(scanEvent->strValue());
else if (scanEvent->type() == ScannerEvent::SetPercentComplete)
else if (scanEvent->type() == ScannerEvent::kSetPercentComplete)
m_scanStage->SetScanProgress(scanEvent->intValue() * 0.01);
else if (scanEvent->type() == ScannerEvent::SetStatusRotorPosition)
else if (scanEvent->type() == ScannerEvent::kSetStatusRotorPosition)
m_scanStage->SetStatusRotorPosition(scanEvent->intValue());
else if (scanEvent->type() == ScannerEvent::SetStatusSignalLock)
else if (scanEvent->type() == ScannerEvent::kSetStatusSignalLock)
m_scanStage->SetStatusLock(scanEvent->intValue());
else if (scanEvent->type() == ScannerEvent::SetStatusSignalToNoise)
else if (scanEvent->type() == ScannerEvent::kSetStatusSignalToNoise)
m_scanStage->SetStatusSignalToNoise(scanEvent->intValue());
else if (scanEvent->type() == ScannerEvent::SetStatusSignalStrength)
else if (scanEvent->type() == ScannerEvent::kSetStatusSignalStrength)
m_scanStage->SetStatusSignalStrength(scanEvent->intValue());
}

Expand All @@ -153,7 +153,7 @@ void ChannelScannerGUI::quitScanning(void)

if (m_scanMonitor)
{
post_event(m_scanMonitor, ScannerEvent::ScanShutdown, kCodeRejected);
post_event(m_scanMonitor, ScannerEvent::kScanShutdown, kCodeRejected);
}
}

Expand Down
34 changes: 17 additions & 17 deletions mythtv/libs/libmythtv/channelscan/channelscanner_web.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ bool ChannelScannerWeb::StartScan (uint cardid,
m_serviceRequirements = service_requirements;
m_sourceid = sourceid;
// The import is handled by the monitor thread after the complete event
post_event(m_scanMonitor, ScannerEvent::ScanComplete, 0);
post_event(m_scanMonitor, ScannerEvent::kScanComplete, 0);
}
else if (nScanType == ScanTypeSetting::IPTVImport)
{
Expand Down Expand Up @@ -406,7 +406,7 @@ void ChannelScannerWeb::stopScan()
{
if (m_scanMonitor)
{
post_event(m_scanMonitor, ScannerEvent::ScanShutdown, 0);
post_event(m_scanMonitor, ScannerEvent::kScanShutdown, 0);
}
}

Expand Down Expand Up @@ -434,19 +434,19 @@ void ChannelScannerWeb::stopMon(void)
void ChannelScannerWeb::HandleEvent(const ScannerEvent *scanEvent)
{
auto type = scanEvent->type();
if ((type == ScannerEvent::ScanComplete) ||
(type == ScannerEvent::ScanShutdown) ||
(type == ScannerEvent::ScanErrored))
if ((type == ScannerEvent::kScanComplete) ||
(type == ScannerEvent::kScanShutdown) ||
(type == ScannerEvent::kScanErrored))
{
if (type == ScannerEvent::ScanComplete)
if (type == ScannerEvent::kScanComplete)
{
m_statusText = tr("Scan Complete");
}
else if (type == ScannerEvent::ScanShutdown)
else if (type == ScannerEvent::kScanShutdown)
{
m_statusText = tr("Scan Shut Down");
}
else if (type == ScannerEvent::ScanErrored)
else if (type == ScannerEvent::kScanErrored)
{
m_statusText = tr("Scan Error") + " " + scanEvent->strValue();
}
Expand Down Expand Up @@ -474,29 +474,29 @@ void ChannelScannerWeb::HandleEvent(const ScannerEvent *scanEvent)
m_serviceRequirements);
ci.Process(transports, get_on_input("sourceid", m_cardid).toUInt());
}
else if (type != ScannerEvent::ScanErrored) // && !m_transports.empty())
else if (type != ScannerEvent::kScanErrored) // && !m_transports.empty())
{
Process(m_transports, success);
}
stopMon();
m_status = "IDLE";

}
else if (type == ScannerEvent::AppendTextToLog)
else if (type == ScannerEvent::kAppendTextToLog)
log(scanEvent->strValue());
else if (type == ScannerEvent::SetStatusText)
else if (type == ScannerEvent::kSetStatusText)
m_statusText = scanEvent->strValue();
else if (type == ScannerEvent::SetPercentComplete)
else if (type == ScannerEvent::kSetPercentComplete)
m_statusProgress = scanEvent->intValue();
else if (type == ScannerEvent::SetStatusSignalLock)
else if (type == ScannerEvent::kSetStatusSignalLock)
m_statusLock = scanEvent->boolValue();
else if (type == ScannerEvent::SetStatusSignalToNoise)
else if (type == ScannerEvent::kSetStatusSignalToNoise)
m_statusSnr = scanEvent->intValue() * 100 / 65535;
else if (type == ScannerEvent::SetStatusTitleText)
else if (type == ScannerEvent::kSetStatusTitleText)
m_statusTitleText = scanEvent->strValue();
else if (type == ScannerEvent::SetStatusRotorPosition)
else if (type == ScannerEvent::kSetStatusRotorPosition)
m_statusRotorPosition = scanEvent->intValue();
else if (type == ScannerEvent::SetStatusSignalStrength)
else if (type == ScannerEvent::kSetStatusSignalStrength)
m_statusSignalStrength = scanEvent->intValue() * 100 / 65535;

QString msg;
Expand Down
46 changes: 23 additions & 23 deletions mythtv/libs/libmythtv/channelscan/scanmonitor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,29 +35,29 @@
// Qt headers
#include <QCoreApplication>

QEvent::Type ScannerEvent::ScanComplete =
const QEvent::Type ScannerEvent::kScanComplete =
(QEvent::Type) QEvent::registerEventType();
QEvent::Type ScannerEvent::ScanShutdown =
const QEvent::Type ScannerEvent::kScanShutdown =
(QEvent::Type) QEvent::registerEventType();
QEvent::Type ScannerEvent::ScanErrored =
const QEvent::Type ScannerEvent::kScanErrored =
(QEvent::Type) QEvent::registerEventType();
QEvent::Type ScannerEvent::AppendTextToLog =
const QEvent::Type ScannerEvent::kAppendTextToLog =
(QEvent::Type) QEvent::registerEventType();
QEvent::Type ScannerEvent::SetStatusText =
const QEvent::Type ScannerEvent::kSetStatusText =
(QEvent::Type) QEvent::registerEventType();
QEvent::Type ScannerEvent::SetStatusTitleText =
const QEvent::Type ScannerEvent::kSetStatusTitleText =
(QEvent::Type) QEvent::registerEventType();
QEvent::Type ScannerEvent::SetPercentComplete =
const QEvent::Type ScannerEvent::kSetPercentComplete =
(QEvent::Type) QEvent::registerEventType();
QEvent::Type ScannerEvent::SetStatusRotorPosition =
const QEvent::Type ScannerEvent::kSetStatusRotorPosition =
(QEvent::Type) QEvent::registerEventType();
QEvent::Type ScannerEvent::SetStatusSignalToNoise =
const QEvent::Type ScannerEvent::kSetStatusSignalToNoise =
(QEvent::Type) QEvent::registerEventType();
QEvent::Type ScannerEvent::SetStatusSignalStrength =
const QEvent::Type ScannerEvent::kSetStatusSignalStrength =
(QEvent::Type) QEvent::registerEventType();
QEvent::Type ScannerEvent::SetStatusSignalLock =
const QEvent::Type ScannerEvent::kSetStatusSignalLock =
(QEvent::Type) QEvent::registerEventType();
QEvent::Type ScannerEvent::SetStatusChannelTuned =
const QEvent::Type ScannerEvent::kSetStatusChannelTuned =
(QEvent::Type) QEvent::registerEventType();

/// Percentage to set to after the transports have been scanned
Expand Down Expand Up @@ -97,18 +97,18 @@ void ScanMonitor::deleteLater(void)

void ScanMonitor::ScanComplete(void)
{
post_event(this, ScannerEvent::ScanComplete, 0);
post_event(this, ScannerEvent::kScanComplete, 0);
}

void ScanMonitor::ScanPercentComplete(int pct)
{
int tmp = TRANSPORT_PCT + ((100 - TRANSPORT_PCT) * pct)/100;
post_event(this, ScannerEvent::SetPercentComplete, tmp);
post_event(this, ScannerEvent::kSetPercentComplete, tmp);
}

void ScanMonitor::ScanAppendTextToLog(const QString &status)
{
post_event(this, ScannerEvent::AppendTextToLog, status);
post_event(this, ScannerEvent::kAppendTextToLog, status);
}

void ScanMonitor::ScanUpdateStatusText(const QString &status)
Expand All @@ -117,44 +117,44 @@ void ScanMonitor::ScanUpdateStatusText(const QString &status)
if (!status.isEmpty())
msg = QString("%1 %2").arg(msg, status);

post_event(this, ScannerEvent::SetStatusText, msg);
post_event(this, ScannerEvent::kSetStatusText, msg);
}

void ScanMonitor::ScanUpdateStatusTitleText(const QString &status)
{
post_event(this, ScannerEvent::SetStatusTitleText, status);
post_event(this, ScannerEvent::kSetStatusTitleText, status);
}

void ScanMonitor::ScanErrored(const QString &error)
{
post_event(this, ScannerEvent::ScanErrored, error);
post_event(this, ScannerEvent::kScanErrored, error);
}

void ScanMonitor::StatusRotorPosition(const SignalMonitorValue &val)
{
post_event(this, ScannerEvent::SetStatusRotorPosition,
post_event(this, ScannerEvent::kSetStatusRotorPosition,
val.GetNormalizedValue(0, 65535));
}

void ScanMonitor::StatusSignalLock(const SignalMonitorValue &val)
{
post_event(this, ScannerEvent::SetStatusSignalLock, val.GetValue());
post_event(this, ScannerEvent::kSetStatusSignalLock, val.GetValue());
}

void ScanMonitor::StatusChannelTuned(const SignalMonitorValue &val)
{
post_event(this, ScannerEvent::SetStatusChannelTuned, val.GetValue());
post_event(this, ScannerEvent::kSetStatusChannelTuned, val.GetValue());
}

void ScanMonitor::StatusSignalToNoise(const SignalMonitorValue &val)
{
post_event(this, ScannerEvent::SetStatusSignalToNoise,
post_event(this, ScannerEvent::kSetStatusSignalToNoise,
val.GetNormalizedValue(0, 65535));
}

void ScanMonitor::StatusSignalStrength(const SignalMonitorValue &val)
{
post_event(this, ScannerEvent::SetStatusSignalStrength,
post_event(this, ScannerEvent::kSetStatusSignalStrength,
val.GetNormalizedValue(0, 65535));
}

Expand Down
24 changes: 12 additions & 12 deletions mythtv/libs/libmythtv/channelscan/scanmonitor.h
Original file line number Diff line number Diff line change
Expand Up @@ -103,18 +103,18 @@ class ScannerEvent : public QEvent
void ConfigurableValue(Configurable *cfg_ptr)
{ m_cfgPtr = cfg_ptr; }

static Type ScanComplete;
static Type ScanShutdown;
static Type ScanErrored;
static Type AppendTextToLog;
static Type SetStatusText;
static Type SetStatusTitleText;
static Type SetPercentComplete;
static Type SetStatusRotorPosition;
static Type SetStatusSignalToNoise;
static Type SetStatusSignalStrength;
static Type SetStatusSignalLock;
static Type SetStatusChannelTuned;
static const Type kScanComplete;
static const Type kScanShutdown;
static const Type kScanErrored;
static const Type kAppendTextToLog;
static const Type kSetStatusText;
static const Type kSetStatusTitleText;
static const Type kSetPercentComplete;
static const Type kSetStatusRotorPosition;
static const Type kSetStatusSignalToNoise;
static const Type kSetStatusSignalStrength;
static const Type kSetStatusSignalLock;
static const Type kSetStatusChannelTuned;

private:
~ScannerEvent() override = default;
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythtv/jobqueue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ JobQueue::~JobQueue(void)

void JobQueue::customEvent(QEvent *e)
{
if (e->type() == MythEvent::MythEventMessage)
if (e->type() == MythEvent::kMythEventMessage)
{
auto *me = dynamic_cast<MythEvent *>(e);
if (me == nullptr)
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythtv/mythsystemevent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ QString MythSystemEventHandler::EventNameToSetting(const QString &name)
*/
void MythSystemEventHandler::customEvent(QEvent *e)
{
if (e->type() == MythEvent::MythEventMessage)
if (e->type() == MythEvent::kMythEventMessage)
{
auto *me = dynamic_cast<MythEvent *>(e);
if (me == nullptr)
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythtv/previewgenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ bool PreviewGenerator::RemotePreviewRun(void)

bool PreviewGenerator::event(QEvent *e)
{
if (e->type() != MythEvent::MythEventMessage)
if (e->type() != MythEvent::kMythEventMessage)
return QObject::event(e);

auto *me = dynamic_cast<MythEvent*>(e);
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythtv/previewgeneratorqueue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ void PreviewGeneratorQueue::RemoveListener(QObject *listener)
*/
bool PreviewGeneratorQueue::event(QEvent *e)
{
if (e->type() != MythEvent::MythEventMessage)
if (e->type() != MythEvent::kMythEventMessage)
return QObject::event(e);

auto *me = dynamic_cast<MythEvent*>(e);
Expand Down
8 changes: 4 additions & 4 deletions mythtv/libs/libmythtv/tv_play.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2940,8 +2940,8 @@ bool TV::eventFilter(QObject* Object, QEvent* Event)
if (MythGestureEvent::kEventType == Event->type())
return m_ignoreKeyPresses ? false : event(Event);

if (Event->type() == MythEvent::MythEventMessage ||
Event->type() == MythEvent::MythUserMessage ||
if (Event->type() == MythEvent::kMythEventMessage ||
Event->type() == MythEvent::kMythUserMessage ||
Event->type() == MythEvent::kUpdateTvProgressEventType ||
Event->type() == MythMediaEvent::kEventType)
{
Expand Down Expand Up @@ -7140,7 +7140,7 @@ void TV::customEvent(QEvent *Event)
return;
}

if (Event->type() == MythEvent::MythUserMessage)
if (Event->type() == MythEvent::kMythUserMessage)
{
auto *me = dynamic_cast<MythEvent*>(Event);
if (me == nullptr)
Expand Down Expand Up @@ -7220,7 +7220,7 @@ void TV::customEvent(QEvent *Event)
return;
}

if (Event->type() != MythEvent::MythEventMessage)
if (Event->type() != MythEvent::kMythEventMessage)
return;

uint cardnum = 0;
Expand Down
4 changes: 2 additions & 2 deletions mythtv/libs/libmythtv/tv_rec.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3880,7 +3880,7 @@ MPEGStreamData *TVRec::TuningSignalCheck(void)
if (!m_curRecording->GetSubtitle().isEmpty())
title += " - " + m_curRecording->GetSubtitle();

MythNotification mn(MythNotification::Check, desc,
MythNotification mn(MythNotification::kCheck, desc,
"Recording", title,
tr("See 'Tuning timeout' in mythtv-setup "
"for this input."));
Expand Down Expand Up @@ -3935,7 +3935,7 @@ MPEGStreamData *TVRec::TuningSignalCheck(void)
if (!m_curRecording->GetSubtitle().isEmpty())
title += " - " + m_curRecording->GetSubtitle();

MythNotification mn(MythNotification::Error, desc,
MythNotification mn(MythNotification::kError, desc,
"Recording", title,
tr("See 'Tuning timeout' in mythtv-setup "
"for this input."));
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythui/devices/jsmenuevent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
// Own header
#include "devices/jsmenuevent.h"

QEvent::Type JoystickKeycodeEvent::kEventType =
const QEvent::Type JoystickKeycodeEvent::kEventType =
(QEvent::Type) QEvent::registerEventType();
2 changes: 1 addition & 1 deletion mythtv/libs/libmythui/devices/jsmenuevent.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class JoystickKeycodeEvent : public QEvent
Qt::KeyboardModifiers keyModifiers() const { return m_keyModifiers; }
QEvent::Type keyAction() const { return m_keyAction; }

static Type kEventType;
static const Type kEventType;

private:
QString m_jsmenueventtext;
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythui/devices/lircevent.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

#include "lircevent.h"

QEvent::Type LircKeycodeEvent::kEventType =
const QEvent::Type LircKeycodeEvent::kEventType =
(QEvent::Type) QEvent::registerEventType();
2 changes: 1 addition & 1 deletion mythtv/libs/libmythui/devices/lircevent.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class LircKeycodeEvent : public QEvent
QString text(void) const { return m_text; }
QString lirctext(void) const { return m_lirctext; }

static Type kEventType;
static const Type kEventType;

static const unsigned kLIRCInvalidKeyCombo = 0xFFFFFFFF;

Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythui/mythdialogbox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#include "mythuispinbox.h"
#include "mythgesture.h"

QEvent::Type DialogCompletionEvent::kEventType =
const QEvent::Type DialogCompletionEvent::kEventType =
(QEvent::Type) QEvent::registerEventType();

// Force this class to have a vtable so that dynamic_cast works.
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 @@ -54,7 +54,7 @@ class MUI_PUBLIC DialogCompletionEvent : public QEvent
QString GetResultText() { return m_resultText; }
QVariant GetData() { return m_resultData; }

static Type kEventType;
static const Type kEventType;

private:
QString m_id;
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythui/mythgesture.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
#include <algorithm>
#include <complex>

QEvent::Type MythGestureEvent::kEventType = static_cast<QEvent::Type>(QEvent::registerEventType());
const QEvent::Type MythGestureEvent::kEventType = static_cast<QEvent::Type>(QEvent::registerEventType());

/*! \class MythGestureEvent
* \brief A custom event that represents a mouse gesture.
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythui/mythgesture.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ class MUI_PUBLIC MythGestureEvent : public QEvent
Qt::MouseButton GetButton () const { return m_button; }
QString GetButtonName() const;

static Type kEventType;
static const Type kEventType;

private:
Gesture m_gesture { Unknown };
Expand Down
6 changes: 3 additions & 3 deletions mythtv/libs/libmythui/mythmainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,7 @@ void MythMainWindow::DoRemoteScreenShot(const QString& Filename, int Width, int
args << QString::number(Width);
args << QString::number(Height);
args << Filename;
MythEvent me(MythEvent::MythEventMessage, ACTION_SCREENSHOT, args);
MythEvent me(MythEvent::kMythEventMessage, ACTION_SCREENSHOT, args);
QCoreApplication::sendEvent(this, &me);
}

Expand Down Expand Up @@ -1973,7 +1973,7 @@ void MythMainWindow::customEvent(QEvent* Event)
{
MythUDP::EnableUDPListener(true);
}
else if (Event->type() == MythEvent::MythEventMessage)
else if (Event->type() == MythEvent::kMythEventMessage)
{
auto * event = dynamic_cast<MythEvent *>(Event);
if (event == nullptr)
Expand Down Expand Up @@ -2059,7 +2059,7 @@ void MythMainWindow::customEvent(QEvent* Event)
gCoreContext->AllowShutdown();
}
}
else if (Event->type() == MythEvent::MythUserMessage)
else if (Event->type() == MythEvent::kMythUserMessage)
{
if (auto * event = dynamic_cast<MythEvent *>(Event); event != nullptr)
if (const QString& message = event->Message(); !message.isEmpty())
Expand Down
30 changes: 19 additions & 11 deletions mythtv/libs/libmythui/mythnotification.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,30 @@
#include "libmythbase/mythlogging.h"
#include "mythnotification.h"

const QEvent::Type MythNotification::kNew = static_cast<QEvent::Type>(QEvent::registerEventType());
const QEvent::Type MythNotification::kUpdate = static_cast<QEvent::Type>(QEvent::registerEventType());
const QEvent::Type MythNotification::kInfo = static_cast<QEvent::Type>(QEvent::registerEventType());
const QEvent::Type MythNotification::kError = static_cast<QEvent::Type>(QEvent::registerEventType());
const QEvent::Type MythNotification::kWarning = static_cast<QEvent::Type>(QEvent::registerEventType());
const QEvent::Type MythNotification::kCheck = static_cast<QEvent::Type>(QEvent::registerEventType());
const QEvent::Type MythNotification::kBusy = static_cast<QEvent::Type>(QEvent::registerEventType());

MythNotification::MythNotification(Type nType, void* Parent)
: MythEvent(nType, "NOTIFICATION"),
m_parent(Parent)
{
}

MythNotification::MythNotification(int Id, void* Parent)
: MythEvent(Update, "NOTIFICATION"),
: MythEvent(kUpdate, "NOTIFICATION"),
m_id(Id),
m_parent(Parent)
{
}

MythNotification::MythNotification(const QString& Title, const QString& Author,
const QString& Details)
: MythEvent(New, "NOTIFICATION"),
: MythEvent(kNew, "NOTIFICATION"),
m_description(Title),
m_metadata({{"minm", Title}, {"asar", Author}, {"asal", Details}})
{
Expand Down Expand Up @@ -227,11 +235,11 @@ QString MythPlaybackNotification::StringFromSeconds(std::chrono::seconds Time)

MythNotification::Type MythNotification::TypeFromString(const QString& Type)
{
if (Type == "error") return MythNotification::Error;
if (Type == "warning") return MythNotification::Warning;
if (Type == "check") return MythNotification::Check;
if (Type == "busy") return MythNotification::Busy;
return MythNotification::New;
if (Type == "error") return MythNotification::kError;
if (Type == "warning") return MythNotification::kWarning;
if (Type == "check") return MythNotification::kCheck;
if (Type == "busy") return MythNotification::kBusy;
return MythNotification::kNew;
}

MythImageNotification::MythImageNotification(Type nType, QImage Image)
Expand Down Expand Up @@ -340,27 +348,27 @@ MythEvent* MythMediaNotification::clone() const

MythErrorNotification::MythErrorNotification(const QString& Title, const QString& Author,
const QString& Details)
: MythNotification(Error, Title, Author, Details)
: MythNotification(kError, Title, Author, Details)
{
SetDuration(10s);
}

MythWarningNotification::MythWarningNotification(const QString& Title, const QString& Author,
const QString& Details)
: MythNotification(Warning, Title, Author, Details)
: MythNotification(kWarning, Title, Author, Details)
{
SetDuration(10s);
}

MythCheckNotification::MythCheckNotification(const QString& Title, const QString& Author,
const QString& Details)
: MythNotification(Check, Title, Author, Details)
: MythNotification(kCheck, Title, Author, Details)
{
SetDuration(5s);
}

MythBusyNotification::MythBusyNotification(const QString& Title, const QString& Author,
const QString& Details)
: MythNotification(Busy, Title, Author, Details)
: MythNotification(kBusy, Title, Author, Details)
{
}
14 changes: 7 additions & 7 deletions mythtv/libs/libmythui/mythnotification.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ using VNMask = unsigned int;
class MUI_PUBLIC MythNotification : public MythEvent
{
public:
static inline Type New = static_cast<QEvent::Type>(QEvent::registerEventType());
static inline Type Update = static_cast<QEvent::Type>(QEvent::registerEventType());
static inline Type Info = static_cast<QEvent::Type>(QEvent::registerEventType());
static inline Type Error = static_cast<QEvent::Type>(QEvent::registerEventType());
static inline Type Warning = static_cast<QEvent::Type>(QEvent::registerEventType());
static inline Type Check = static_cast<QEvent::Type>(QEvent::registerEventType());
static inline Type Busy = static_cast<QEvent::Type>(QEvent::registerEventType());
static const Type kNew;
static const Type kUpdate;
static const Type kInfo;
static const Type kError;
static const Type kWarning;
static const Type kCheck;
static const Type kBusy;

MythNotification(Type nType, void* Parent = nullptr);
MythNotification(int Id, void* Parent);
Expand Down
36 changes: 18 additions & 18 deletions mythtv/libs/libmythui/mythnotificationcenter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ static constexpr std::chrono::milliseconds DEFAULT_DURATION { 5s };

//// MythNotificationCenterEvent

QEvent::Type MythNotificationCenterEvent::kEventType =
const QEvent::Type MythNotificationCenterEvent::kEventType =
(QEvent::Type) QEvent::registerEventType();

//// class MythNotificationScreenStack
Expand Down Expand Up @@ -211,15 +211,15 @@ void MythNotificationScreen::SetNotification(MythNotification &notification)

m_type = notification.type();

if (m_type == MythNotification::Error ||
m_type == MythNotification::Warning ||
m_type == MythNotification::Check ||
m_type == MythNotification::Busy)
if (m_type == MythNotification::kError ||
m_type == MythNotification::kWarning ||
m_type == MythNotification::kCheck ||
m_type == MythNotification::kBusy)
{
m_update |= kImage;
update = false;
}
else if (m_type == MythNotification::Update)
else if (m_type == MythNotification::kUpdate)
{
update = true;
}
Expand Down Expand Up @@ -500,19 +500,19 @@ void MythNotificationScreen::SetErrorState(void) const

const char *state {nullptr};

if (m_type == MythNotification::Error)
if (m_type == MythNotification::kError)
{
state = "error";
}
else if (m_type == MythNotification::Warning)
else if (m_type == MythNotification::kWarning)
{
state = "warning";
}
else if (m_type == MythNotification::Check)
else if (m_type == MythNotification::kCheck)
{
state = "check";
}
else if (m_type == MythNotification::Busy)
else if (m_type == MythNotification::kBusy)
{
state = "busy";
}
Expand Down Expand Up @@ -884,7 +884,7 @@ bool NCPrivate::Queue(const MythNotification &notification)
// refuse all notification updates
if (m_suspended.contains(id))
{
if (notification.type() == MythNotification::Update)
if (notification.type() == MythNotification::kUpdate)
return false;
// got something else than an update, remove it from the
// suspended list
Expand Down Expand Up @@ -1458,7 +1458,7 @@ void ShowNotification(bool error,
const MythNotification::Priority priority,
const QString &style)
{
ShowNotification(error ? MythNotification::Error : MythNotification::New,
ShowNotification(error ? MythNotification::kError : MythNotification::kNew,
msg, origin, detail, image, extra, progress_text, progress,
duration, fullscreen, visibility, priority, style);
}
Expand Down Expand Up @@ -1488,15 +1488,15 @@ void ShowNotification(MythNotification::Type type,
data["asal"] = detail;
data["asfm"] = extra;

if (type == MythNotification::Error ||
type == MythNotification::Warning ||
type == MythNotification::Check ||
type == MythNotification::Busy)
if (type == MythNotification::kError ||
type == MythNotification::kWarning ||
type == MythNotification::kCheck ||
type == MythNotification::kBusy)
{
n = new MythNotification(type, data);
if (duration != 0s &&
type != MythNotification::Check &&
type != MythNotification::Busy)
type != MythNotification::kCheck &&
type != MythNotification::kBusy)
{
// default duration for those type of notifications is 10s
duration = 10s;
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythui/mythnotificationcenter.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class MUI_PUBLIC MythNotificationCenterEvent : public MythEvent
public:
MythNotificationCenterEvent() : MythEvent(kEventType) { }

static Type kEventType;
static const Type kEventType;

// No implicit copying.
MythNotificationCenterEvent(MythNotificationCenterEvent &&) = delete;
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 @@ -213,7 +213,7 @@ public slots:
bool m_created {false};
uint32_t m_content {kNone};
uint32_t m_update {(uint32_t)kAll};
MythNotification::Type m_type {MythNotification::New};
MythNotification::Type m_type {MythNotification::kNew};
MythUIImage *m_artworkImage {nullptr};
MythUIText *m_titleText {nullptr};
MythUIText *m_originText {nullptr};
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythui/mythprogressdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include "mythuitext.h"
#include "mythuiprogressbar.h"

QEvent::Type ProgressUpdateEvent::kEventType =
const QEvent::Type ProgressUpdateEvent::kEventType =
(QEvent::Type) QEvent::registerEventType();

// Force this class to have a vtable so that dynamic_cast works.
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythui/mythprogressdialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class MUI_PUBLIC ProgressUpdateEvent : public QEvent
uint GetTotal() const { return m_total; }
uint GetCount() const { return m_count; }

static Type kEventType;
static const Type kEventType;

private:
uint m_total {0};
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythui/mythscreentype.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class SemaphoreLocker
QSemaphore *m_lock {nullptr};
};

QEvent::Type ScreenLoadCompletionEvent::kEventType =
const QEvent::Type ScreenLoadCompletionEvent::kEventType =
(QEvent::Type) QEvent::registerEventType();

class ScreenLoadTask : public QRunnable
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythui/mythscreentype.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class MUI_PUBLIC ScreenLoadCompletionEvent : public QEvent

QString GetId() { return m_id; }

static Type kEventType;
static const Type kEventType;

private:
QString m_id;
Expand Down
4 changes: 2 additions & 2 deletions mythtv/libs/libmythui/mythudplistener.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ void MythUDPListener::Process(const QByteArray& Buffer, const QHostAddress& /*Se
if (notification)
{
origin = origin.isEmpty() ? tr("UDP Listener") : origin;
ShowNotification(error ? MythNotification::Error :
ShowNotification(error ? MythNotification::kError :
MythNotification::TypeFromString(type),
msg, origin, description, image, extra,
progress_text, progress, timeout,
Expand All @@ -165,7 +165,7 @@ void MythUDPListener::Process(const QByteArray& Buffer, const QHostAddress& /*Se
else
{
QStringList args(QString::number(timeout.count()));
qApp->postEvent(GetMythMainWindow(), new MythEvent(MythEvent::MythUserMessage, msg, args));
qApp->postEvent(GetMythMainWindow(), new MythEvent(MythEvent::kMythUserMessage, msg, args));
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions mythtv/libs/libmythui/mythuibuttonlist.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2725,10 +2725,10 @@ class NextButtonListPageEvent : public QEvent
QEvent(kEventType), m_start(start), m_pageSize(pageSize) {}
const int m_start;
const int m_pageSize;
static Type kEventType;
static const Type kEventType;
};

QEvent::Type NextButtonListPageEvent::kEventType =
const QEvent::Type NextButtonListPageEvent::kEventType =
(QEvent::Type) QEvent::registerEventType();

void MythUIButtonList::customEvent(QEvent *event)
Expand Down
4 changes: 2 additions & 2 deletions mythtv/libs/libmythui/mythuiimage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ class ImageLoadEvent : public QEvent
AnimationFrames *GetAnimationFrames() const { return m_images; }
bool GetAbortState() const { return m_aborted; }

static Type kEventType;
static const Type kEventType;

private:
const MythUIImage *m_parent {nullptr};
Expand All @@ -478,7 +478,7 @@ class ImageLoadEvent : public QEvent
bool m_aborted;
};

QEvent::Type ImageLoadEvent::kEventType =
const QEvent::Type ImageLoadEvent::kEventType =
(QEvent::Type) QEvent::registerEventType();

/*!
Expand Down
4 changes: 2 additions & 2 deletions mythtv/libs/libmythui/mythuiwebbrowser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ QString BrowserApi::GetMetadata(void)

void BrowserApi::customEvent(QEvent *e)
{
if (e->type() == MythEvent::MythEventMessage)
if (e->type() == MythEvent::kMythEventMessage)
{
auto *me = dynamic_cast<MythEvent *>(e);
if (me == nullptr)
Expand Down Expand Up @@ -652,7 +652,7 @@ void MythWebView::customEvent(QEvent *event)
}
}
}
else if (event->type() == MythEvent::MythEventMessage)
else if (event->type() == MythEvent::kMythEventMessage)
{
auto *me = dynamic_cast<MythEvent *>(event);
if (me == nullptr)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ bool WebSocketMythEvent::HandleTextFrame(const WebSocketFrame &frame)

void WebSocketMythEvent::customEvent(QEvent* event)
{
if (event->type() == MythEvent::MythEventMessage)
if (event->type() == MythEvent::kMythEventMessage)
{
if (!m_sendEvents)
return;
Expand Down
2 changes: 1 addition & 1 deletion mythtv/programs/mythbackend/mainserver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1134,7 +1134,7 @@ void MainServer::customEvent(QEvent *e)
}
}

if (e->type() == MythEvent::MythEventMessage)
if (e->type() == MythEvent::kMythEventMessage)
{
auto *me = dynamic_cast<MythEvent *>(e);
if (me == nullptr)
Expand Down
2 changes: 1 addition & 1 deletion mythtv/programs/mythcommflag/mythcommflag.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ static void commDetectorGotNewCommercialBreakList(void)

static void incomingCustomEvent(QEvent* e)
{
if (e->type() == MythEvent::MythEventMessage)
if (e->type() == MythEvent::kMythEventMessage)
{
auto *me = dynamic_cast<MythEvent *>(e);
if (me == nullptr)
Expand Down
2 changes: 1 addition & 1 deletion mythtv/programs/mythfrontend/audiogeneralsettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -630,7 +630,7 @@ AudioTestThread::AudioTestThread(QObject *parent,
}
}

QEvent::Type ChannelChangedEvent::kEventType =
const QEvent::Type ChannelChangedEvent::kEventType =
static_cast<QEvent::Type>(QEvent::registerEventType());

AudioTestThread::~AudioTestThread()
Expand Down
2 changes: 1 addition & 1 deletion mythtv/programs/mythfrontend/audiogeneralsettings.h
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ class ChannelChangedEvent : public QEvent
QString m_channel;
bool m_fulltest;

static Type kEventType;
static const Type kEventType;
};

class AudioTestThread : public MThread
Expand Down
2 changes: 1 addition & 1 deletion mythtv/programs/mythfrontend/backendconnectionmanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ void BackendConnectionManager::customEvent(QEvent *event)
bool reconnect = false;
uint reconnect_timeout = 5000;

if (event->type() == MythEvent::MythEventMessage)
if (event->type() == MythEvent::kMythEventMessage)
{
auto *me = dynamic_cast<MythEvent *>(event);
if (me == nullptr)
Expand Down
2 changes: 1 addition & 1 deletion mythtv/programs/mythfrontend/galleryslideview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ bool GallerySlideView::keyPressEvent(QKeyEvent *event)
*/
void GallerySlideView::customEvent(QEvent *event)
{
if (event->type() == MythEvent::MythEventMessage)
if (event->type() == MythEvent::kMythEventMessage)
{
auto *me = dynamic_cast<MythEvent *>(event);
if (me == nullptr)
Expand Down
2 changes: 1 addition & 1 deletion mythtv/programs/mythfrontend/gallerythumbview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ bool GalleryThumbView::keyPressEvent(QKeyEvent *event)
void GalleryThumbView::customEvent(QEvent *event)
{

if (event->type() == MythEvent::MythEventMessage)
if (event->type() == MythEvent::kMythEventMessage)
{
auto *me = dynamic_cast<MythEvent *>(event);
if (me == nullptr)
Expand Down
6 changes: 3 additions & 3 deletions mythtv/programs/mythfrontend/guidegrid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -346,9 +346,9 @@ class UpdateGuideEvent : public QEvent
explicit UpdateGuideEvent(GuideUpdaterBase *updater) :
QEvent(kEventType), m_updater(updater) {}
GuideUpdaterBase *m_updater {nullptr};
static Type kEventType;
static const Type kEventType;
};
QEvent::Type UpdateGuideEvent::kEventType =
const QEvent::Type UpdateGuideEvent::kEventType =
(QEvent::Type) QEvent::registerEventType();

class GuideHelper : public QRunnable
Expand Down Expand Up @@ -1853,7 +1853,7 @@ void GuideUpdateProgramRow::fillProgramRowInfosWith(int row,

void GuideGrid::customEvent(QEvent *event)
{
if (event->type() == MythEvent::MythEventMessage)
if (event->type() == MythEvent::kMythEventMessage)
{
auto *me = dynamic_cast<MythEvent *>(event);
if (me == nullptr)
Expand Down
2 changes: 1 addition & 1 deletion mythtv/programs/mythfrontend/idlescreen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ bool IdleScreen::keyPressEvent(QKeyEvent* event)

void IdleScreen::customEvent(QEvent* event)
{
if (event->type() == MythEvent::MythEventMessage)
if (event->type() == MythEvent::kMythEventMessage)
{
auto *me = dynamic_cast<MythEvent *>(event);
if (me == nullptr)
Expand Down
10 changes: 5 additions & 5 deletions mythtv/programs/mythfrontend/networkcontrol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@
static constexpr qint64 FE_SHORT_TO { 2000 }; // 2 seconds
static constexpr qint64 FE_LONG_TO { 10000 }; // 10 seconds

static QEvent::Type kNetworkControlDataReadyEvent =
static const QEvent::Type kNetworkControlDataReadyEvent =
(QEvent::Type) QEvent::registerEventType();
QEvent::Type NetworkControlCloseEvent::kEventType =
const QEvent::Type NetworkControlCloseEvent::kEventType =
(QEvent::Type) QEvent::registerEventType();

static const QRegularExpression kChanID1RE { "^\\d+$" };
Expand Down Expand Up @@ -1541,7 +1541,7 @@ QString NetworkControl::processMessage(NetworkCommand *nc)

QString message = nc->getCommand().remove(0, 7).trimmed();
MythMainWindow *window = GetMythMainWindow();
auto* me = new MythEvent(MythEvent::MythUserMessage, message);
auto* me = new MythEvent(MythEvent::kMythUserMessage, message);
qApp->postEvent(window, me);
return {"OK"};
}
Expand Down Expand Up @@ -1595,7 +1595,7 @@ void NetworkControl::sendReplyToClient(NetworkControlClient *ncc,

void NetworkControl::customEvent(QEvent *e)
{
if (e->type() == MythEvent::MythEventMessage)
if (e->type() == MythEvent::kMythEventMessage)
{
auto *me = dynamic_cast<MythEvent *>(e);
if (me == nullptr)
Expand Down Expand Up @@ -1862,7 +1862,7 @@ QString NetworkControl::saveScreenshot(NetworkCommand *nc)
args << QString::number(width);
args << QString::number(height);
}
auto *me = new MythEvent(MythEvent::MythEventMessage,
auto *me = new MythEvent(MythEvent::kMythEventMessage,
ACTION_SCREENSHOT, args);
qApp->postEvent(window, me);
return "OK";
Expand Down
2 changes: 1 addition & 1 deletion mythtv/programs/mythfrontend/networkcontrol.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ class NetworkControlCloseEvent : public QEvent

NetworkControlClient *getClient() { return m_networkControlClient; }

static Type kEventType;
static const Type kEventType;

private:
NetworkControlClient *m_networkControlClient {nullptr};
Expand Down
2 changes: 1 addition & 1 deletion mythtv/programs/mythfrontend/playbackbox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3918,7 +3918,7 @@ void PlaybackBox::customEvent(QEvent *event)
if (resultid == "transcode" && dce->GetResult() >= 0)
changeProfileAndTranscode(dce->GetData().toInt());
}
else if (event->type() == MythEvent::MythEventMessage)
else if (event->type() == MythEvent::kMythEventMessage)
{
auto *me = dynamic_cast<MythEvent *>(event);
if (me == nullptr)
Expand Down
2 changes: 1 addition & 1 deletion mythtv/programs/mythfrontend/playbackboxhelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ bool PBHEventHandler::event(QEvent *e)
}
return true;
}
if (e->type() == MythEvent::MythEventMessage)
if (e->type() == MythEvent::kMythEventMessage)
{
auto *me = dynamic_cast<MythEvent*>(e);
if (me == nullptr)
Expand Down
2 changes: 1 addition & 1 deletion mythtv/programs/mythfrontend/progfind.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ void ProgFinder::ShowMenu(void)

void ProgFinder::customEvent(QEvent *event)
{
if (event->type() == MythEvent::MythEventMessage)
if (event->type() == MythEvent::kMythEventMessage)
{
auto *me = dynamic_cast<MythEvent *>(event);
if (me == nullptr)
Expand Down
2 changes: 1 addition & 1 deletion mythtv/programs/mythfrontend/proglist.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1666,7 +1666,7 @@ void ProgLister::customEvent(QEvent *event)
ShowChooseViewMenu();
}
}
else if (event->type() == MythEvent::MythEventMessage)
else if (event->type() == MythEvent::kMythEventMessage)
{
auto *me = dynamic_cast<MythEvent *>(event);
if (me == nullptr)
Expand Down
4 changes: 2 additions & 2 deletions mythtv/programs/mythfrontend/services/frontend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ bool Frontend::SendMessage(const QString &Message, uint TimeoutInt)
if (Timeout > 0s && Timeout < 1000s)
data << QString::number(Timeout.count());
qApp->postEvent(GetMythMainWindow(),
new MythEvent(MythEvent::MythUserMessage, Message,
new MythEvent(MythEvent::kMythUserMessage, Message,
data));
return true;
}
Expand All @@ -78,7 +78,7 @@ bool Frontend::SendNotification(bool Error,
if (!GetNotificationCenter())
return false;

ShowNotification(Error ? MythNotification::Error :
ShowNotification(Error ? MythNotification::kError :
MythNotification::TypeFromString(Type),
Message,
Origin.isNull() ? tr("FrontendServices") : Origin,
Expand Down
4 changes: 2 additions & 2 deletions mythtv/programs/mythfrontend/services/mythfrontendservice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ bool MythFrontendService::SendMessage(const QString& Message, uint Timeout)
if (Message.isEmpty())
return false;
QStringList data(QString::number(std::clamp(Timeout, 0U, 1000U)));
qApp->postEvent(GetMythMainWindow(), new MythEvent(MythEvent::MythUserMessage, Message, data));
qApp->postEvent(GetMythMainWindow(), new MythEvent(MythEvent::kMythUserMessage, Message, data));
return true;
}

Expand All @@ -182,7 +182,7 @@ bool MythFrontendService::SendNotification(bool Error, const QSt
if (Message.isEmpty() || !GetNotificationCenter())
return false;

ShowNotification(Error ? MythNotification::Error : MythNotification::TypeFromString(Type),
ShowNotification(Error ? MythNotification::kError : MythNotification::TypeFromString(Type),
Message, Origin.isNull() ? tr("FrontendServices") : Origin,
Description, Image, Extra, ProgressText, Progress, Timeout,
Fullscreen, Visibility, static_cast<MythNotification::Priority>(Priority));
Expand Down
2 changes: 1 addition & 1 deletion mythtv/programs/mythfrontend/setupwizard_video.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ void VideoSetupWizard::initProgressDialog()

void VideoSetupWizard::customEvent(QEvent *e)
{
if (e->type() == MythEvent::MythEventMessage)
if (e->type() == MythEvent::kMythEventMessage)
{
auto *me = dynamic_cast<MythEvent *>(e);
if (me == nullptr)
Expand Down
2 changes: 1 addition & 1 deletion mythtv/programs/mythfrontend/themechooser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -812,7 +812,7 @@ void ThemeChooser::updateProgressBar(int bytesReceived,

void ThemeChooser::customEvent(QEvent *e)
{
if (e->type() == MythEvent::MythEventMessage)
if (e->type() == MythEvent::kMythEventMessage)
{
auto *me = dynamic_cast<MythEvent *>(e);
if (me == nullptr)
Expand Down
2 changes: 1 addition & 1 deletion mythtv/programs/mythfrontend/upnpscanner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -647,7 +647,7 @@ void UPNPScanner::replyFinished(QNetworkReply *reply)
*/
void UPNPScanner::customEvent(QEvent *event)
{
if (event->type() != MythEvent::MythEventMessage)
if (event->type() != MythEvent::kMythEventMessage)
return;

// UPnP events
Expand Down
2 changes: 1 addition & 1 deletion mythtv/programs/mythfrontend/viewscheduled.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,7 @@ void ViewScheduled::EmbedTVWindow(void)

void ViewScheduled::customEvent(QEvent *event)
{
if (event->type() == MythEvent::MythEventMessage)
if (event->type() == MythEvent::kMythEventMessage)
{
auto *me = dynamic_cast<MythEvent *>(event);
if (me == nullptr)
Expand Down
2 changes: 1 addition & 1 deletion mythtv/programs/mythlcdserver/lcdprocclient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2388,7 +2388,7 @@ LCDProcClient::~LCDProcClient()

void LCDProcClient::customEvent(QEvent *e)
{
if (e->type() == MythEvent::MythEventMessage)
if (e->type() == MythEvent::kMythEventMessage)
{
auto *me = dynamic_cast<MythEvent *>(e);
if (me == nullptr)
Expand Down
2 changes: 1 addition & 1 deletion mythtv/programs/mythwelcome/welcomedialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ void WelcomeDialog::checkAutoStart(void)

void WelcomeDialog::customEvent(QEvent *e)
{
if (e->type() == MythEvent::MythEventMessage)
if (e->type() == MythEvent::kMythEventMessage)
{
auto *me = dynamic_cast<MythEvent *>(e);
if (me == nullptr)
Expand Down