10 changes: 5 additions & 5 deletions mythtv/libs/libmyth/audio/audiooutput.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ AudioOutput::AudioDeviceConfig* AudioOutput::GetAudioDeviceConfig(
}
LOG(VB_AUDIO, LOG_INFO, QString("Found %1 (%2)")
.arg(name).arg(capabilities));
auto adc = new AudioOutput::AudioDeviceConfig(name, capabilities);
auto *adc = new AudioOutput::AudioDeviceConfig(name, capabilities);
adc->m_settings = aosettings;
return adc;
}
Expand Down Expand Up @@ -434,7 +434,7 @@ AudioOutput::ADCVect* AudioOutput::GetOutputList(void)
QString desc = i.value();
QString devname = QString("ALSA:%1").arg(key);

auto adc = GetAudioDeviceConfig(devname, desc);
auto *adc = GetAudioDeviceConfig(devname, desc);
if (!adc)
continue;
list->append(*adc);
Expand Down Expand Up @@ -464,7 +464,7 @@ AudioOutput::ADCVect* AudioOutput::GetOutputList(void)
{
QString name = "JACK:";
QString desc = tr("Use JACK default sound server.");
auto adc = GetAudioDeviceConfig(name, desc);
auto *adc = GetAudioDeviceConfig(name, desc);
if (adc)
{
list->append(*adc);
Expand Down Expand Up @@ -544,7 +544,7 @@ AudioOutput::ADCVect* AudioOutput::GetOutputList(void)
{
QString name = "PulseAudio:default";
QString desc = tr("PulseAudio default sound server.");
auto adc = GetAudioDeviceConfig(name, desc);
auto *adc = GetAudioDeviceConfig(name, desc);
if (adc)
{
list->append(*adc);
Expand Down Expand Up @@ -578,7 +578,7 @@ AudioOutput::ADCVect* AudioOutput::GetOutputList(void)

QString name = "NULL";
QString desc = "NULL device";
auto adc = GetAudioDeviceConfig(name, desc);
auto *adc = GetAudioDeviceConfig(name, desc);
if (adc)
{
list->append(*adc);
Expand Down
4 changes: 2 additions & 2 deletions mythtv/libs/libmyth/backendselect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,8 @@ void BackendSelection::AddItem(DeviceLocation *dev)
// We only want the version number, not the library version info
infomap["version"] = infomap["modelnumber"].section('.', 0, 1);

auto item = new MythUIButtonListItem(m_backendList, infomap["modelname"],
QVariant::fromValue(dev));
auto *item = new MythUIButtonListItem(m_backendList, infomap["modelname"],
QVariant::fromValue(dev));
item->SetTextFromMap(infomap);

bool protoMatch = (infomap["protocolversion"] == MYTH_PROTO_VERSION);
Expand Down
8 changes: 4 additions & 4 deletions mythtv/libs/libmyth/langsettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ void LanguageSelection::Load(void)
{
QString code = langMap.key(nativeLang); // Slow, but map is small
QString language = GetISO639EnglishLanguageName(code);
auto item = new MythUIButtonListItem(m_languageList, nativeLang);
auto *item = new MythUIButtonListItem(m_languageList, nativeLang);
item->SetText(language, "language");
item->SetText(nativeLang, "nativelanguage");
item->SetData(code);
Expand All @@ -140,8 +140,8 @@ void LanguageSelection::Load(void)
LOG(VB_GUI, LOG_ERR, "ERROR - Failed to load translations, at least "
"one translation file MUST be installed.");

auto item = new MythUIButtonListItem(m_languageList,
"English (United States)");
auto *item = new MythUIButtonListItem(m_languageList,
"English (United States)");
item->SetText("English (United States)", "language");
item->SetText("English (United States)", "nativelanguage");
item->SetData("en_US");
Expand All @@ -157,7 +157,7 @@ void LanguageSelection::Load(void)
{
QString code = localesMap.key(country); // Slow, but map is small
QString nativeCountry = GetISO3166CountryName(code);
auto item = new MythUIButtonListItem(m_countryList, country);
auto *item = new MythUIButtonListItem(m_countryList, country);
item->SetData(code);
item->SetText(country, "country");
item->SetText(nativeCountry, "nativecountry");
Expand Down
4 changes: 2 additions & 2 deletions mythtv/libs/libmyth/mythmediamonitor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -216,15 +216,15 @@ MythMediaDevice * MediaMonitor::selectDrivePopup(const QString &label,
int btnIndex = -2;
while (btnIndex < -1)
{
auto dlg = new MythDialogBox(label, stack, "select drive");
auto *dlg = new MythDialogBox(label, stack, "select drive");
if (!dlg->Create())
{
delete dlg;
return nullptr;
}

// Add button for each drive
for (auto drive : drives)
for (auto *drive : drives)
dlg->AddButton(DevName(drive));

dlg->AddButton(tr("Cancel"));
Expand Down
4 changes: 2 additions & 2 deletions mythtv/libs/libmyth/programinfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,7 @@ ProgramInfo::ProgramInfo(
if (m_originalAirDate.isValid() && m_originalAirDate < QDate(1940, 1, 1))
m_originalAirDate = QDate();

for (auto it : schedList)
for (auto *it : schedList)
{
// If this showing is scheduled to be recorded, then we need to copy
// some of the information from the scheduler
Expand Down Expand Up @@ -6039,7 +6039,7 @@ bool GetNextRecordingList(QDateTime &nextRecordingStart,
return false;

// find the earliest scheduled recording
for (auto prog : progList)
for (auto *prog : progList)
{
if ((prog->GetRecordingStatus() == RecStatus::WillRecord ||
prog->GetRecordingStatus() == RecStatus::Pending) &&
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmyth/rawsettingseditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ void RawSettingsEditor::updatePrevNextTexts(void)
if (m_prevNextShapes.contains(i))
m_prevNextShapes[i]->Show();

auto tmpitem = m_settingsList->GetItemAt(curPos + i);
auto *tmpitem = m_settingsList->GetItemAt(curPos + i);
m_prevNextTexts[i]->SetText(
m_settingValues[tmpitem->GetData().toString()]);
}
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmyth/schemawizard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ MythSchemaUpgrade SchemaUpgradeWizard::GuiPrompt(const QString &message,
int btnIndex = -1;
while (btnIndex < 0)
{
auto dlg = new MythDialogBox(message, stack, "upgrade");
auto *dlg = new MythDialogBox(message, stack, "upgrade");
if (!dlg->Create())
{
delete dlg;
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmyth/standardsettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -796,7 +796,7 @@ void StandardSettingDialog::customEvent(QEvent *event)
{
if (event->type() == DialogCompletionEvent::kEventType)
{
auto dce = dynamic_cast<DialogCompletionEvent*>(event);
auto *dce = dynamic_cast<DialogCompletionEvent*>(event);
if (dce == nullptr)
return;
QString resultid = dce->GetId();
Expand Down
6 changes: 3 additions & 3 deletions mythtv/libs/libmyth/test/test_settings/test_settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ class TestSettings: public QObject
static void ByName(void)
{
GroupSetting parent;
auto setting = new ButtonStandardSetting("setting");
auto *setting = new ButtonStandardSetting("setting");
setting->setName("setting");
parent.addChild(setting);

auto combobox = new ComboBox();
auto targetedSetting = new ButtonStandardSetting("targetedsetting");
auto *combobox = new ComboBox();
auto *targetedSetting = new ButtonStandardSetting("targetedsetting");
targetedSetting->setName("targetedsetting");
combobox->addTargetedChild("target", targetedSetting);
parent.addChild(combobox);
Expand Down
12 changes: 6 additions & 6 deletions mythtv/libs/libmythbase/mythdownloadmanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1151,7 +1151,7 @@ void MythDownloadManager::removeListener(QObject *caller)
*/
void MythDownloadManager::downloadError(QNetworkReply::NetworkError errorCode)
{
auto reply = dynamic_cast<QNetworkReply *>(sender());
auto *reply = dynamic_cast<QNetworkReply *>(sender());
if (reply == nullptr)
return;

Expand Down Expand Up @@ -1439,7 +1439,7 @@ void MythDownloadManager::downloadFinished(MythDownloadInfo *dlInfo)
void MythDownloadManager::downloadProgress(qint64 bytesReceived,
qint64 bytesTotal)
{
auto reply = dynamic_cast<QNetworkReply *>(sender());
auto *reply = dynamic_cast<QNetworkReply *>(sender());
if (reply == nullptr)
return;

Expand Down Expand Up @@ -1664,7 +1664,7 @@ void MythDownloadManager::saveCookieJar(const QString &filename)
if (!m_manager->cookieJar())
return;

auto jar = dynamic_cast<MythCookieJar *>(m_manager->cookieJar());
auto *jar = dynamic_cast<MythCookieJar *>(m_manager->cookieJar());
if (jar == nullptr)
return;
jar->save(filename);
Expand All @@ -1686,7 +1686,7 @@ QNetworkCookieJar *MythDownloadManager::copyCookieJar(void)
if (!m_manager->cookieJar())
return nullptr;

auto inJar = dynamic_cast<MythCookieJar *>(m_manager->cookieJar());
auto *inJar = dynamic_cast<MythCookieJar *>(m_manager->cookieJar());
if (inJar == nullptr)
return nullptr;
auto *outJar = new MythCookieJar;
Expand All @@ -1703,7 +1703,7 @@ void MythDownloadManager::refreshCookieJar(QNetworkCookieJar *jar)
QMutexLocker locker(&m_cookieLock);
delete m_inCookieJar;

auto inJar = dynamic_cast<MythCookieJar *>(jar);
auto *inJar = dynamic_cast<MythCookieJar *>(jar);
if (inJar == nullptr)
return;

Expand All @@ -1721,7 +1721,7 @@ void MythDownloadManager::updateCookieJar(void)
{
QMutexLocker locker(&m_cookieLock);

auto inJar = dynamic_cast<MythCookieJar *>(m_inCookieJar);
auto *inJar = dynamic_cast<MythCookieJar *>(m_inCookieJar);
if (inJar != nullptr)
{
auto *outJar = new MythCookieJar;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ void TestSortHelper::pathnames_timing(void)
void TestSortHelper::Variations_test(void)
{
// Case sensitive, keep prefixes (aka no-op)
auto sh = new MythSortHelper(Qt::CaseSensitive, SortPrefixKeep, "");
auto *sh = new MythSortHelper(Qt::CaseSensitive, SortPrefixKeep, "");
QVERIFY(sh->doTitle("The Blob") == "The Blob");
QVERIFY(sh->doTitle("The Blob") != "the blob");
QVERIFY(sh->doTitle("The Blob") != "Blob");
Expand Down
4 changes: 2 additions & 2 deletions mythtv/libs/libmythmetadata/metadatafactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,7 @@ void MetadataFactory::customEvent(QEvent *levent)
{
if (levent->type() == MetadataLookupEvent::kEventType)
{
auto lue = dynamic_cast<MetadataLookupEvent *>(levent);
auto *lue = dynamic_cast<MetadataLookupEvent *>(levent);
if (lue == nullptr)
return;

Expand All @@ -531,7 +531,7 @@ void MetadataFactory::customEvent(QEvent *levent)
}
else if (levent->type() == MetadataLookupFailure::kEventType)
{
auto luf = dynamic_cast<MetadataLookupFailure *>(levent);
auto *luf = dynamic_cast<MetadataLookupFailure *>(levent);
if (luf == nullptr)
return;

Expand Down
4 changes: 2 additions & 2 deletions mythtv/libs/libmythmetadata/metaioflacvorbis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ TagLib::FLAC::Picture *MetaIOFLACVorbis::getPictureFromFile(
// From what I can tell, FLAC::File maintains ownership of the Picture pointers, so no need to delete
const TagLib::List<Picture *>& picList = flacfile->pictureList();

for (auto entry : picList)
for (auto *entry : picList)
{
if (entry->type() == artType)
{
Expand Down Expand Up @@ -251,7 +251,7 @@ AlbumArtList MetaIOFLACVorbis::getAlbumArtList(const QString &filename)
{
const TagLib::List<Picture *>& picList = flacfile->pictureList();

for (auto pic : picList)
for (auto *pic : picList)
{
// Assume a valid image would have at least
// 100 bytes of data (1x1 indexed gif is 35 bytes)
Expand Down
6 changes: 3 additions & 3 deletions mythtv/libs/libmythmetadata/metaioid3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,13 +120,13 @@ TagLib::ID3v2::Tag* MetaIOID3::GetID3v2Tag(bool create)

if (m_fileType == kMPEG)
{
auto file = dynamic_cast<TagLib::MPEG::File*>(m_file);
auto *file = dynamic_cast<TagLib::MPEG::File*>(m_file);
return (file != nullptr) ? file->ID3v2Tag(create) : nullptr;
}

if (m_fileType == kFLAC)
{
auto file = dynamic_cast<TagLib::FLAC::File*>(m_file);
auto *file = dynamic_cast<TagLib::FLAC::File*>(m_file);
return (file != nullptr) ? file->ID3v2Tag(create) : nullptr;
}

Expand All @@ -140,7 +140,7 @@ TagLib::ID3v1::Tag* MetaIOID3::GetID3v1Tag(bool create)

if (m_fileType == kMPEG)
{
auto file = dynamic_cast<TagLib::MPEG::File*>(m_file);
auto *file = dynamic_cast<TagLib::MPEG::File*>(m_file);
return (file != nullptr) ? file->ID3v1Tag(create) : nullptr;
}

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 @@ -139,7 +139,7 @@ QString GenerateNonce(void)
int nonceParts[4];
QString nonce;
#if QT_VERSION >= QT_VERSION_CHECK(5,10,0)
auto randgen = QRandomGenerator::global();
auto *randgen = QRandomGenerator::global();
nonceParts[0] = randgen->generate();
nonceParts[1] = randgen->generate();
nonceParts[2] = randgen->generate();
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 @@ -1103,7 +1103,7 @@ void MythRAOPConnection::ProcessRequest(const QStringList &header,
if (tags.contains("Transport"))
{
// New client is trying to play audio, disconnect all the other clients
auto dev = dynamic_cast<MythRAOPDevice*>(parent());
auto *dev = dynamic_cast<MythRAOPDevice*>(parent());
if (dev != nullptr)
dev->DeleteAllClients(this);
gCoreContext->WantingPlayback(parent());
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythtv/cc608reader.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class CC608Buffer
void Clear(void)
{
m_lock.lock();
for (auto cc : m_buffers)
for (auto *cc : m_buffers)
delete cc;
m_buffers.clear();
m_lock.unlock();
Expand Down
14 changes: 7 additions & 7 deletions mythtv/libs/libmythtv/channelscan/channelscan_sm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1295,7 +1295,7 @@ ChannelScanSM::GetChannelList(transport_scan_items_it_t trans_info,
// PATs
foreach (auto pat_list, scan_info->m_pats)
{
for (auto pat : pat_list)
for (const auto *pat : pat_list)
{
bool could_be_opencable = false;
for (uint i = 0; i < pat->ProgramCount(); ++i)
Expand Down Expand Up @@ -1351,7 +1351,7 @@ ChannelScanSM::GetChannelList(transport_scan_items_it_t trans_info,
}

// Cable VCTs
for (auto cvct : scan_info->m_cvcts)
for (const auto *cvct : scan_info->m_cvcts)
{
for (uint i = 0; i < cvct->ChannelCount(); ++i)
{
Expand All @@ -1362,7 +1362,7 @@ ChannelScanSM::GetChannelList(transport_scan_items_it_t trans_info,
}

// Terrestrial VCTs
for (auto tvct : scan_info->m_tvcts)
for (const auto *tvct : scan_info->m_tvcts)
{
for (uint i = 0; i < tvct->ChannelCount(); ++i)
{
Expand All @@ -1375,7 +1375,7 @@ ChannelScanSM::GetChannelList(transport_scan_items_it_t trans_info,
// SDTs
foreach (auto sdt_list, scan_info->m_sdts)
{
for (auto sdt_it : sdt_list)
for (const auto *sdt_it : sdt_list)
{
for (uint i = 0; i < sdt_it->ServiceCount(); ++i)
{
Expand All @@ -1396,7 +1396,7 @@ ChannelScanSM::GetChannelList(transport_scan_items_it_t trans_info,
ChannelInsertInfo &info = *dbchan_it;

// NIT
for (auto item : scan_info->m_nits)
for (const auto *item : scan_info->m_nits)
{
for (uint i = 0; i < item->TransportStreamCount(); ++i)
{
Expand Down Expand Up @@ -1483,7 +1483,7 @@ ChannelScanSM::GetChannelList(transport_scan_items_it_t trans_info,
// Lookup table from LCN to service ID
QMap<uint,qlonglong> lcn_sid;

for (auto bat : scan_info->m_bats)
for (const auto *bat : scan_info->m_bats)
{
// Only the bouquet selected by user
if (bat->BouquetID() != m_bouquetId)
Expand All @@ -1505,7 +1505,7 @@ ChannelScanSM::GetChannelList(transport_scan_items_it_t trans_info,
bat->TransportDescriptorsLength(t));

uint priv_dsid = 0;
for (auto item : parsed)
for (const auto *item : parsed)
{
if (item[0] == DescriptorID::private_data_specifier)
{
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythtv/channelutil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ vector<uint> ChannelUtil::CreateMultiplexes(

uint tsid = nit->TSID(i);
uint netid = nit->OriginalNetworkID(i);
for (auto j : list)
for (const auto *j : list)
{
const MPEGDescriptor desc(j);
handle_transport_desc(muxes, desc, sourceid, tsid, netid);
Expand Down
6 changes: 4 additions & 2 deletions mythtv/libs/libmythtv/decoders/avformatdecoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1378,9 +1378,11 @@ float AvFormatDecoder::GetVideoFrameRate(AVStream *Stream, AVCodecContext *Conte
};

if (Rate > 1.0 && Rate < 121.0)
{
for (auto rate : s_normRates)
if (qFuzzyCompare(rate, Rate))
return true;
}
return false;
};

Expand Down Expand Up @@ -1809,7 +1811,7 @@ void AvFormatDecoder::ScanTeletextCaptions(int av_index)
pmt.StreamInfo(i), pmt.StreamInfoLength(i),
DescriptorID::teletext);

for (auto desc : desc_list)
for (const auto *desc : desc_list)
{
const TeletextDescriptor td(desc);
if (!td.IsValid())
Expand Down Expand Up @@ -1888,7 +1890,7 @@ void AvFormatDecoder::ScanDSMCCStreams(void)
pmt.StreamInfo(i), pmt.StreamInfoLength(i),
DescriptorID::data_broadcast_id);

for (auto desc : desc_list)
for (const auto *desc : desc_list)
{
desc++; // Skip tag
uint length = *desc++;
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythtv/decoders/mythvaapicontext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ MythCodecID MythVAAPIContext::GetSupportedCodec(AVCodecContext **Context,
MythPlayer* player = nullptr;
if (!gCoreContext->IsUIThread())
{
auto decoder = reinterpret_cast<AvFormatDecoder*>((*Context)->opaque);
auto *decoder = reinterpret_cast<AvFormatDecoder*>((*Context)->opaque);
if (decoder)
player = decoder->GetPlayer();
}
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythtv/decoders/nuppeldecoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -980,7 +980,7 @@ long NuppelDecoder::UpdateStoredFrameNum(long framenum)
{
long sync_offset = 0;

for (auto data : m_storedData)
for (auto *data : m_storedData)
{
if (data->frameheader.frametype == 'S' &&
data->frameheader.comptype == 'V')
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythtv/diseqc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1333,7 +1333,7 @@ bool DiSEqCDevSwitch::Store(void) const

// chain to children
bool success = true;
for (auto child : m_children)
for (auto *child : m_children)
{
if (child)
success &= child->Store();
Expand Down
6 changes: 3 additions & 3 deletions mythtv/libs/libmythtv/mpeg/mpegdescriptors.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ desc_list_t MPEGDescriptor::ParseOnlyInclude(
const unsigned char *MPEGDescriptor::Find(const desc_list_t &parsed,
uint desc_tag)
{
for (auto item : parsed)
for (const auto *item : parsed)
{
if (item[0] == desc_tag)
return item;
Expand All @@ -89,7 +89,7 @@ const unsigned char *MPEGDescriptor::Find(const desc_list_t &parsed,
desc_list_t MPEGDescriptor::FindAll(const desc_list_t &parsed, uint desc_tag)
{
desc_list_t tmp;
for (auto item : parsed)
for (const auto *item : parsed)
{
if (item[0] == desc_tag)
tmp.push_back(item);
Expand Down Expand Up @@ -194,7 +194,7 @@ desc_list_t MPEGDescriptor::FindBestMatches(
if (match_pri == UINT_MAX)
return tmp;

for (auto j : parsed)
for (const auto *j : parsed)
{
if ((DescriptorID::extended_event == desc_tag) &&
(DescriptorID::extended_event == j[0]))
Expand Down
4 changes: 2 additions & 2 deletions mythtv/libs/libmythtv/mpeg/mpegstreamdata.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -417,10 +417,10 @@ static desc_list_t extract_atsc_desc(const tvct_vec_t &tvct,

vector<const VirtualChannelTable*> vct;

for (auto i : tvct)
for (const auto *i : tvct)
vct.push_back(i);

for (auto i : cvct)
for (const auto *i : cvct)
vct.push_back(i);

for (size_t i = 0; i < tvct.size(); i++)
Expand Down
4 changes: 2 additions & 2 deletions mythtv/libs/libmythtv/mpeg/mpegtables.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ ProgramMapTable* ProgramMapTable::Create(
pmt->SetVersionNumber(version);

vector<unsigned char> gdesc;
for (auto gd : global_desc)
for (const auto *gd : global_desc)
{
uint len = gd[1] + 2;
gdesc.insert(gdesc.end(), gd, gd + len);
Expand All @@ -450,7 +450,7 @@ ProgramMapTable* ProgramMapTable::Create(
for (uint i = 0; i < count; i++)
{
vector<unsigned char> pdesc;
for (auto pd : prog_desc[i])
for (const auto *pd : prog_desc[i])
{
uint len = pd[1] + 2;
pdesc.insert(pdesc.end(), pd, pd + len);
Expand Down
4 changes: 2 additions & 2 deletions mythtv/libs/libmythtv/mpeg/splicedescriptors.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ desc_list_t SpliceDescriptor::ParseOnlyInclude(
const unsigned char *SpliceDescriptor::Find(
const desc_list_t &parsed, uint desc_tag)
{
for (auto item : parsed)
for (const auto *item : parsed)
{
if (item[0] == desc_tag)
return item;
Expand All @@ -99,7 +99,7 @@ const unsigned char *SpliceDescriptor::Find(
desc_list_t SpliceDescriptor::FindAll(const desc_list_t &parsed, uint desc_tag)
{
desc_list_t tmp;
for (auto item : parsed)
for (const auto *item : parsed)
{
if (item[0] == desc_tag)
tmp.push_back(item);
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythtv/mythplayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3035,7 +3035,7 @@ void MythPlayer::HandleDecoderCallback(MythPlayer *Player, const QString &Debug,
void MythPlayer::ProcessCallbacks(void)
{
m_decoderCallbackLock.lock();
for (auto it = m_decoderCallbacks.cbegin(); it != m_decoderCallbacks.cend(); ++it)
for (const auto *it = m_decoderCallbacks.cbegin(); it != m_decoderCallbacks.cend(); ++it)
{
if (it->m_function)
{
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythtv/opengl/mythdrmprimeinterop.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ vector<MythVideoTexture*> MythDRMPRIMEInterop::Acquire(MythRenderOpenGL *Context
if (!Frame)
return result;

auto drmdesc = VerifyBuffer(Context, Frame);
auto *drmdesc = VerifyBuffer(Context, Frame);
if (!drmdesc)
return result;

Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythtv/osd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ void OSD::LoadWindows(void)
"osd_message", "osd_input", "program_info", "browse_info", "osd_status",
"osd_program_editor", "osd_debug"};

for (auto window : s_defaultWindows)
for (const auto *window : s_defaultWindows)
{
auto *win = new MythOSDWindow(nullptr, window, true);

Expand Down
8 changes: 4 additions & 4 deletions mythtv/libs/libmythtv/recorders/dvbdev/dvbci.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1773,7 +1773,7 @@ bool cLlCiHandler::Process(void)
UserIO |= session->HasUserIO();
if (session->ResourceId() == RI_CONDITIONAL_ACCESS_SUPPORT)
{
auto cas = dynamic_cast<cCiConditionalAccessSupport *>(session);
auto *cas = dynamic_cast<cCiConditionalAccessSupport *>(session);
if (cas == nullptr)
continue;
m_needCaPmt |= cas->NeedCaPmt();
Expand All @@ -1790,7 +1790,7 @@ bool cLlCiHandler::Process(void)
bool cLlCiHandler::EnterMenu(int Slot)
{
cMutexLock MutexLock(&m_mutex);
auto api = dynamic_cast<cCiApplicationInformation *>(GetSessionByResourceId(RI_APPLICATION_INFORMATION, Slot));
auto *api = dynamic_cast<cCiApplicationInformation *>(GetSessionByResourceId(RI_APPLICATION_INFORMATION, Slot));
return api ? api->EnterMenu() : false;
}

Expand Down Expand Up @@ -1819,14 +1819,14 @@ cCiEnquiry *cLlCiHandler::GetEnquiry(void)
const unsigned short *cLlCiHandler::GetCaSystemIds(int Slot)
{
cMutexLock MutexLock(&m_mutex);
auto cas = dynamic_cast<cCiConditionalAccessSupport *>(GetSessionByResourceId(RI_CONDITIONAL_ACCESS_SUPPORT, Slot));
auto *cas = dynamic_cast<cCiConditionalAccessSupport *>(GetSessionByResourceId(RI_CONDITIONAL_ACCESS_SUPPORT, Slot));
return cas ? cas->GetCaSystemIds() : nullptr;
}

bool cLlCiHandler::SetCaPmt(cCiCaPmt &CaPmt, int Slot)
{
cMutexLock MutexLock(&m_mutex);
auto cas = dynamic_cast<cCiConditionalAccessSupport *>(GetSessionByResourceId(RI_CONDITIONAL_ACCESS_SUPPORT, Slot));
auto *cas = dynamic_cast<cCiConditionalAccessSupport *>(GetSessionByResourceId(RI_CONDITIONAL_ACCESS_SUPPORT, Slot));
return cas && cas->SendPMT(CaPmt);
}

Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythtv/recorders/signalmonitor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ void SignalMonitor::SendMessage(
m_statusLock.unlock();

QMutexLocker locker(&m_listenerLock);
for (auto listener : m_listeners)
for (auto *listener : m_listeners)
{
auto *dvblistener = dynamic_cast<DVBSignalMonitorListener*>(listener);

Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythtv/subtitlescreen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1350,7 +1350,7 @@ void FormattedTextSubtitle708::Init(const CC708Window &win,
m_xAnchor = anchor_x;
m_yAnchor = anchor_y;

for (auto str708 : list)
for (auto *str708 : list)
{
if (str708->m_y >= (uint)m_lines.size())
m_lines.resize(str708->m_y + 1);
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythtv/transporteditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ static CardUtil::INPUT_TYPES get_cardtype(uint sourceid)

void TransportListEditor::SetSourceID(uint _sourceid)
{
for (auto setting : m_list)
for (auto *setting : m_list)
removeChild(setting);
m_list.clear();

Expand Down
4 changes: 2 additions & 2 deletions mythtv/libs/libmythtv/tv_play.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12189,7 +12189,7 @@ void TV::FillOSDMenuJumpRec(PlayerContext* ctx, const QString &category,
QString currecgroup = ctx->m_playingInfo->GetRecordingGroup();
ctx->UnlockPlayingInfo(__FILE__, __LINE__);

for (auto pi : *infoList)
for (auto *pi : *infoList)
{
if (pi->GetRecordingGroup() != "LiveTV" || LiveTVInAllPrograms ||
pi->GetRecordingGroup() == currecgroup)
Expand Down Expand Up @@ -12234,7 +12234,7 @@ void TV::FillOSDMenuJumpRec(PlayerContext* ctx, const QString &category,
titles_seen.push_back(p->GetTitle());

int j = -1;
for (auto q : plist)
for (auto *q : plist)
{
j++;

Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythtv/videobuffers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1038,7 +1038,7 @@ const QString& DebugString(uint FrameNum, bool Short)
static unsigned long long to_bitmap(const frame_queue_t& Queue, int Num)
{
unsigned long long bitmap = 0;
for (auto it : Queue)
for (auto *it : Queue)
{
int shift = DebugNum(it) % Num;
bitmap |= 1ULL << shift;
Expand Down
4 changes: 2 additions & 2 deletions mythtv/libs/libmythtv/visualisations/videovisual.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ bool VideoVisual::CanVisualise(AudioPlayer *audio, MythRender *render)
QStringList VideoVisual::GetVisualiserList(RenderType type)
{
QStringList result;
for (auto factory = VideoVisualFactory::VideoVisualFactories();
for (auto *factory = VideoVisualFactory::VideoVisualFactories();
factory; factory = factory->next())
{
if (factory->SupportedRenderer(type))
Expand All @@ -30,7 +30,7 @@ VideoVisual* VideoVisual::Create(const QString &name,
if (!audio || !render || name.isEmpty())
return nullptr;

for (auto factory = VideoVisualFactory::VideoVisualFactories();
for (auto *factory = VideoVisualFactory::VideoVisualFactories();
factory; factory = factory->next())
{
if (name.isEmpty())
Expand Down
6 changes: 3 additions & 3 deletions mythtv/libs/libmythui/mythdialogbox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,7 @@ MythConfirmationDialog *ShowOkPopup(const QString &message, QObject *parent,
return nullptr;
}

auto pop = new MythConfirmationDialog(stk, message, showCancel);
auto *pop = new MythConfirmationDialog(stk, message, showCancel);
if (pop->Create())
{
stk->AddScreen(pop);
Expand Down Expand Up @@ -980,7 +980,7 @@ bool MythTimeInputDialog::Create()
selected = true;
}

auto item = new MythUIButtonListItem(m_dateList, text, nullptr, false);
auto *item = new MythUIButtonListItem(m_dateList, text, nullptr, false);
item->SetData(QVariant(date));

if (selected)
Expand Down Expand Up @@ -1021,7 +1021,7 @@ bool MythTimeInputDialog::Create()
selected = true;
}

auto item = new MythUIButtonListItem(m_timeList, text, nullptr, false);
auto *item = new MythUIButtonListItem(m_timeList, text, nullptr, false);
item->SetData(QVariant(time));

if (selected)
Expand Down
7 changes: 4 additions & 3 deletions mythtv/libs/libmythui/mythdisplay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ QScreen *MythDisplay::GetDesiredScreen(void)
// this matches the check in MythMainWindow
bool windowed = GetMythDB()->GetBoolSetting("RunFrontendInWindow", false) &&
!MythMainWindow::WindowIsAlwaysFullscreen();
QRect override = GetMythUI()->GetGeometryOverride();
QRect override = MythUIHelper::GetGeometryOverride();
// When windowed, we use topleft as a best guess as to which screen we belong in.
// When fullscreen, Qt appears to use the reverse - though this may be
// the window manager rather than Qt. So could be wrong.
Expand Down Expand Up @@ -563,7 +563,7 @@ void MythDisplay::Initialise(void)
void MythDisplay::InitScreenBounds(void)
{
QList<QScreen*> screens = qGuiApp->screens();
for (auto screen : screens)
for (auto *screen : screens)
{
QRect dim = screen->geometry();
QString extra = MythDisplay::GetExtraScreenInfo(screen);
Expand Down Expand Up @@ -799,8 +799,9 @@ double MythDisplay::GetAspectRatio(QString &Source, bool IgnoreModeOverride)
Source = tr("Override");
return override;
}

// Auto for multiscreen is a best guess
else if (multiscreen)
if (multiscreen)
{
double aspect = EstimateVirtualAspectRatio();
if (valid(aspect))
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 @@ -2122,7 +2122,7 @@ bool MythMainWindow::eventFilter(QObject * /*watched*/, QEvent *e)
}
#endif

for (auto it = d->m_stackList.end()-1; it != d->m_stackList.begin()-1; --it)
for (auto *it = d->m_stackList.end()-1; it != d->m_stackList.begin()-1; --it)
{
MythScreenType *top = (*it)->GetTopScreen();
if (top)
Expand Down Expand Up @@ -2205,7 +2205,7 @@ bool MythMainWindow::eventFilter(QObject * /*watched*/, QEvent *e)

ge->SetButton(button);

for (auto it = d->m_stackList.end()-1;
for (auto *it = d->m_stackList.end()-1;
it != d->m_stackList.begin()-1;
--it)
{
Expand Down Expand Up @@ -2244,7 +2244,7 @@ bool MythMainWindow::eventFilter(QObject * /*watched*/, QEvent *e)

ge->SetPosition(p);

for (auto it = d->m_stackList.end()-1;
for (auto *it = d->m_stackList.end()-1;
it != d->m_stackList.begin()-1;
--it)
{
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythui/mythscreenstack.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ void MythScreenStack::CheckDeletes(bool force)

if (deleteit)
{
for (auto test = m_Children.begin();
for (auto *test = m_Children.begin();
test != m_Children.end();
++test)
{
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythupnp/upnpcdsobjects.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ void CDSObject::toXml( QTextStream &os, FilterMap &filter,

if (!ignoreChildren)
{
for (auto cit : m_children)
for (auto *cit : m_children)
cit->toXml(os, filter);
}

Expand Down
4 changes: 2 additions & 2 deletions mythtv/programs/mythbackend/autoexpire.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -801,7 +801,7 @@ void AutoExpire::PrintExpireList(const QString& expHost)
msg += "(programs listed in order of expiration)";
cout << msg.toLocal8Bit().constData() << endl;

for (auto first : expireList)
for (auto *first : expireList)
{
if (expHost != "ALL" && first->GetHostname() != expHost)
continue;
Expand Down Expand Up @@ -1114,7 +1114,7 @@ bool AutoExpire::IsInDontExpireSet(
bool AutoExpire::IsInExpireList(
const pginfolist_t &expireList, uint chanid, const QDateTime &recstartts)
{
for (auto info : expireList)
for (auto *info : expireList)
{
if ((info->GetChanID() == chanid) &&
(info->GetRecordingStartTime() == recstartts))
Expand Down
10 changes: 5 additions & 5 deletions mythtv/programs/mythbackend/mainserver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1724,7 +1724,7 @@ void MainServer::HandleAnnounce(QStringList &slist, QStringList commands,
}

m_sockListLock.lockForRead();
for (auto pbs : m_playbackList)
for (auto *pbs : m_playbackList)
{
if (pbs->getSocket() == socket)
{
Expand Down Expand Up @@ -2839,7 +2839,7 @@ void MainServer::HandleStopRecording(QStringList &slist, PlaybackSock *pbs)
ProgramList schedList;
bool hasConflicts = false;
LoadFromScheduler(schedList, hasConflicts);
for (auto pInfo : schedList)
for (auto *pInfo : schedList)
{
if ((pInfo->GetRecordingStatus() == RecStatus::Tuning ||
pInfo->GetRecordingStatus() == RecStatus::Failing ||
Expand Down Expand Up @@ -5211,7 +5211,7 @@ void MainServer::BackendQueryDiskSpace(QStringList &strlist, bool consolidated,

m_sockListLock.lockForRead();

for (auto pbs : m_playbackList)
for (auto *pbs : m_playbackList)
{
if ((pbs->IsDisconnected()) ||
(!pbs->isMediaServer()) ||
Expand Down Expand Up @@ -7922,7 +7922,7 @@ PlaybackSock *MainServer::GetSlaveByHostname(const QString &hostname)

m_sockListLock.lockForRead();

for (auto pbs : m_playbackList)
for (auto *pbs : m_playbackList)
{
if (pbs->isSlaveBackend() &&
gCoreContext->IsThisHost(hostname, pbs->getHostname()))
Expand All @@ -7945,7 +7945,7 @@ PlaybackSock *MainServer::GetMediaServerByHostname(const QString &hostname)

QReadLocker rlock(&m_sockListLock);

for (auto pbs : m_playbackList)
for (auto *pbs : m_playbackList)
{
if (pbs->isMediaServer() &&
gCoreContext->IsThisHost(hostname, pbs->getHostname()))
Expand Down
48 changes: 24 additions & 24 deletions mythtv/programs/mythbackend/scheduler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,7 @@ void Scheduler::PrintList(RecList &list, bool onlyFutureRecordings)
LOG(VB_SCHEDULE, LOG_INFO, "Title - Subtitle Ch Station "
"Day Start End G I T N Pri");

for (auto first : list)
for (auto *first : list)
{
if (onlyFutureRecordings &&
((first->GetRecordingEndTime() < now &&
Expand Down Expand Up @@ -634,7 +634,7 @@ void Scheduler::UpdateRecStatus(RecordingInfo *pginfo)
{
QMutexLocker lockit(&m_schedLock);

for (auto p : m_recList)
for (auto *p : m_recList)
{
if (p->IsSameTitleTimeslotAndChannel(*pginfo))
{
Expand Down Expand Up @@ -694,7 +694,7 @@ void Scheduler::UpdateRecStatus(uint cardid, uint chanid,
{
QMutexLocker lockit(&m_schedLock);

for (auto p : m_recList)
for (auto *p : m_recList)
{
if (p->GetInputID() == cardid && p->GetChanID() == chanid &&
p->GetScheduledStartTime() == startts)
Expand Down Expand Up @@ -818,11 +818,11 @@ void Scheduler::SlaveConnected(RecordingList &slavelist)
QMutexLocker lockit(&m_schedLock);
QReadLocker tvlocker(&TVRec::s_inputsLock);

for (auto sp : slavelist)
for (auto *sp : slavelist)
{
bool found = false;

for (auto rp : m_recList)
for (auto *rp : m_recList)
{
if (!sp->GetTitle().isEmpty() &&
sp->GetScheduledStartTime() == rp->GetScheduledStartTime() &&
Expand Down Expand Up @@ -892,7 +892,7 @@ void Scheduler::SlaveDisconnected(uint cardid)
{
QMutexLocker lockit(&m_schedLock);

for (auto rp : m_recList)
for (auto *rp : m_recList)
{
if (rp->GetInputID() == cardid &&
(rp->GetRecordingStatus() == RecStatus::Recording ||
Expand Down Expand Up @@ -921,7 +921,7 @@ void Scheduler::SlaveDisconnected(uint cardid)

void Scheduler::BuildWorkList(void)
{
for (auto p : m_recList)
for (auto *p : m_recList)
{
if (p->GetRecordingStatus() == RecStatus::Recording ||
p->GetRecordingStatus() == RecStatus::Tuning ||
Expand Down Expand Up @@ -1004,7 +1004,7 @@ void Scheduler::BuildListMaps(void)
{
QMap<uint, uint> badinputs;

for (auto p : m_workList)
for (auto *p : m_workList)
{
if (p->GetRecordingStatus() == RecStatus::Recording ||
p->GetRecordingStatus() == RecStatus::Tuning ||
Expand Down Expand Up @@ -1201,7 +1201,7 @@ void Scheduler::MarkOtherShowings(RecordingInfo *p)

void Scheduler::MarkShowingsList(RecList &showinglist, RecordingInfo *p)
{
for (auto q : showinglist)
for (auto *q : showinglist)
{
if (q == p)
continue;
Expand All @@ -1226,15 +1226,15 @@ void Scheduler::MarkShowingsList(RecList &showinglist, RecordingInfo *p)

void Scheduler::BackupRecStatus(void)
{
for (auto p : m_workList)
for (auto *p : m_workList)
{
p->m_savedrecstatus = p->GetRecordingStatus();
}
}

void Scheduler::RestoreRecStatus(void)
{
for (auto p : m_workList)
for (auto *p : m_workList)
{
p->SetRecordingStatus(p->m_savedrecstatus);
}
Expand All @@ -1259,7 +1259,7 @@ bool Scheduler::TryAnotherShowing(RecordingInfo *p, bool samePriority,
RecordingInfo *best = nullptr;
uint bestaffinity = 0;

for (auto q : *showinglist)
for (auto *q : *showinglist)
{
if (q == p)
continue;
Expand Down Expand Up @@ -1507,7 +1507,7 @@ void Scheduler::SchedNewRetryPass(const RecIter& start, const RecIter& end,
}
SORT_RECLIST(retry_list, comp_retry);

for (auto p : retry_list)
for (auto *p : retry_list)
{
if (p->GetRecordingStatus() != RecStatus::Unknown)
continue;
Expand Down Expand Up @@ -1728,7 +1728,7 @@ bool Scheduler::GetAllPending(RecList &retList, int recRuleId) const

bool hasconflicts = false;

for (auto p : m_recList)
for (auto *p : m_recList)
{
if (recRuleId > 0 &&
p->GetRecordingRuleID() != static_cast<uint>(recRuleId))
Expand All @@ -1747,7 +1747,7 @@ bool Scheduler::GetAllPending(ProgramList &retList, int recRuleId) const

bool hasconflicts = false;

for (auto p : m_recList)
for (auto *p : m_recList)
{
if (recRuleId > 0 &&
p->GetRecordingRuleID() != static_cast<uint>(recRuleId))
Expand All @@ -1766,7 +1766,7 @@ QMap<QString,ProgramInfo*> Scheduler::GetRecording(void) const
QMutexLocker lockit(&m_schedLock);

QMap<QString,ProgramInfo*> recMap;
for (auto p : m_recList)
for (auto *p : m_recList)
{
if (RecStatus::Recording == p->GetRecordingStatus() ||
RecStatus::Tuning == p->GetRecordingStatus() ||
Expand All @@ -1781,7 +1781,7 @@ RecStatus::Type Scheduler::GetRecStatus(const ProgramInfo &pginfo)
{
QMutexLocker lockit(&m_schedLock);

for (auto p : m_recList)
for (auto *p : m_recList)
{
if (pginfo.IsSameRecording(*p))
{
Expand Down Expand Up @@ -1846,7 +1846,7 @@ void Scheduler::AddRecording(const RecordingInfo &pi)
LOG(VB_GENERAL, LOG_INFO, LOC + QString("AddRecording() recid: %1")
.arg(pi.GetRecordingRuleID()));

for (auto p : m_recList)
for (auto *p : m_recList)
{
if (p->GetRecordingStatus() == RecStatus::Recording &&
p->IsSameTitleTimeslotAndChannel(pi))
Expand Down Expand Up @@ -2425,7 +2425,7 @@ bool Scheduler::HandleReschedule(void)
LOG(VB_GENERAL, LOG_INFO, msg);

// Write changed entries to oldrecorded.
for (auto p : m_recList)
for (auto *p : m_recList)
{
if (p->GetRecordingStatus() != p->m_oldrecstatus)
{
Expand Down Expand Up @@ -2547,7 +2547,7 @@ void Scheduler::HandleWakeSlave(RecordingInfo &ri, int prerollseconds)

if (keys.empty())
{
for (auto rec : m_recList)
for (auto *rec : m_recList)
keys.insert(rec->MakeUniqueKey());
keys.insert("something");
}
Expand Down Expand Up @@ -2918,7 +2918,7 @@ bool Scheduler::AssignGroupInput(RecordingInfo &ri,

// First, see if anything is already pending or still
// recording.
for (auto p : m_recList)
for (auto *p : m_recList)
{
if (now.secsTo(p->GetRecordingStartTime()) >
prerollseconds + 60)
Expand Down Expand Up @@ -3455,7 +3455,7 @@ void Scheduler::PutInactiveSlavesToSleep(void)
LOG(VB_SCHEDULE, LOG_DEBUG, "Checking scheduler's reclist");
QDateTime curtime = MythDate::current();
QStringList SlavesInUse;
for (auto pginfo : m_recList)
for (auto *pginfo : m_recList)
{
if (pginfo->GetRecordingStatus() != RecStatus::Recording &&
pginfo->GetRecordingStatus() != RecStatus::Tuning &&
Expand Down Expand Up @@ -4596,7 +4596,7 @@ void Scheduler::AddNewRecords(void)
// time should be done after PruneOverlaps, but that would
// complicate the list handling. Do it here unless it becomes
// problematic.
for (auto r : m_workList)
for (auto *r : m_workList)
{
if (p->IsSameTitleStartTimeAndChannel(*r))
{
Expand Down Expand Up @@ -5260,7 +5260,7 @@ int Scheduler::FillRecordingDir(
LOG(VB_FILE | VB_SCHEDULE, LOG_INFO, LOC +
"FillRecordingDir: Adjusting FS Weights from scheduler.");

for (auto thispg : reclist)
for (auto *thispg : reclist)
{
if ((recendts < thispg->GetRecordingStartTime()) ||
(recstartts > thispg->GetRecordingEndTime()) ||
Expand Down
2 changes: 1 addition & 1 deletion mythtv/programs/mythbackend/services/dvr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ DTC::ProgramList* Dvr::GetRecordedList( bool bDescending,

QRegExp rTitleRegEx = QRegExp(sTitleRegEx, Qt::CaseInsensitive);

for (auto pInfo : progList)
for (auto *pInfo : progList)
{
if (pInfo->IsDeletePending() ||
(!sTitleRegEx.isEmpty() && !pInfo->GetTitle().contains(rTitleRegEx)) ||
Expand Down
2 changes: 1 addition & 1 deletion mythtv/programs/mythcommflag/CommDetector2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ int passFinished(FrameAnalyzerItem &pass, long long nframes, bool final)

int passReportTime(const FrameAnalyzerItem &pass)
{
for (auto pas : pass)
for (auto *pas : pass)
(void)pas->reportTime();

return 0;
Expand Down
4 changes: 2 additions & 2 deletions mythtv/programs/mythfrontend/galleryconfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -253,8 +253,8 @@ void GallerySettings::ShowConfirmDialog()
QString msg(TR("Warning! This will erase settings for: hidden images, "
"directory covers and re-orientations. "
"You will have to set them again after re-scanning."));
auto stack = GetMythMainWindow()->GetStack("popup stack");
auto dialog = new MythConfirmationDialog(stack, msg);
auto *stack = GetMythMainWindow()->GetStack("popup stack");
auto *dialog = new MythConfirmationDialog(stack, msg);
if (dialog->Create())
{
stack->AddScreen(dialog);
Expand Down
2 changes: 1 addition & 1 deletion mythtv/programs/mythfrontend/galleryviews.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ void FlatView::Populate(ImageList &files)
double maxWeight = weights.last();

#if QT_VERSION >= QT_VERSION_CHECK(5,10,0)
auto randgen = QRandomGenerator::global();
auto *randgen = QRandomGenerator::global();
#else
qsrand(QTime::currentTime().msec());
#endif
Expand Down
2 changes: 1 addition & 1 deletion mythtv/programs/mythfrontend/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1787,7 +1787,7 @@ static bool WasAutomaticStart(void)
// Find the first recording to be recorded
// on this machine
QString hostname = gCoreContext->GetHostName();
for (auto prog : progList)
for (auto *prog : progList)
{
if ((prog->GetRecordingStatus() == RecStatus::WillRecord ||
prog->GetRecordingStatus() == RecStatus::Pending) &&
Expand Down
4 changes: 2 additions & 2 deletions mythtv/programs/mythfrontend/playbackbox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -682,7 +682,7 @@ void PlaybackBox::updateGroupInfo(const QString &groupname,
ProgramList group = m_progLists[groupname];
float groupSize = 0.0;

for (auto info : group)
for (auto *info : group)
{
if (info)
{
Expand Down Expand Up @@ -1674,7 +1674,7 @@ bool PlaybackBox::UpdateUILists(void)
vector<ProgramInfo*> list;
bool newest_first = (0==m_allOrder);
m_programInfoCache.GetOrdered(list, newest_first);
for (auto p : list)
for (auto *p : list)
{
if (p->IsDeletePending())
continue;
Expand Down
2 changes: 1 addition & 1 deletion mythtv/programs/mythfrontend/prevreclist.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ void PrevRecordedList::UpdateList(MythUIButtonList *bnList,
ProgramList *progData, bool isShows)
{
bnList->Reset();
for (auto pg : *progData)
for (auto *pg : *progData)
{
auto *item = new MythUIButtonListItem(bnList, "",
QVariant::fromValue(pg));
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 @@ -441,7 +441,7 @@ void ProgFinder::updateTimesList()
{
QString itemText;
QDateTime starttime;
for (auto show : m_showData)
for (auto *show : m_showData)
{
starttime = show->GetScheduledStartTime();
itemText = MythDate::toString(starttime,
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 @@ -1541,7 +1541,7 @@ void ProgLister::HandleVisible(MythUIButtonListItem *item)

void ProgLister::UpdateButtonList(void)
{
for (auto it : m_itemList)
for (auto *it : m_itemList)
new MythUIButtonListItem(m_progList, "", QVariant::fromValue(it));
m_progList->LoadInBackground();

Expand Down
2 changes: 1 addition & 1 deletion mythtv/programs/mythfrontend/programrecpriority.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1202,7 +1202,7 @@ void ProgramRecPriority::countMatches()
LoadFromScheduler(schedList);
QDateTime now = MythDate::current();

for (auto program : schedList)
for (auto *program : schedList)
{
const RecStatus::Type recstatus = (*program).GetRecordingStatus();
const uint recordid = (*program).GetRecordingRuleID();
Expand Down
2 changes: 1 addition & 1 deletion mythtv/programs/mythfrontend/statusbox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -710,7 +710,7 @@ void StatusBox::doScheduleStatus()
tmpstr = tr("%n matching showing(s)", "", schedList.size());
AddLogLine(tmpstr, helpmsg);

for (auto s : schedList)
for (auto *s : schedList)
{
const RecStatus::Type recstatus = s->GetRecordingStatus();

Expand Down
2 changes: 1 addition & 1 deletion mythtv/programs/mythfrontend/videolist.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -802,7 +802,7 @@ void VideoListImp::buildGroupList(metadata_list_type whence)
smart_dir_node sdn1 = video_root->addSubDir("All");
meta_dir_node* all_group_node = sdn1.get();

for (auto data : mlist)
for (auto *data : mlist)
{
all_group_node->addEntry(smart_meta_node(new meta_data_node(data)));

Expand Down
4 changes: 2 additions & 2 deletions mythtv/programs/mythfrontend/videoplayercommand.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ class VideoPlayerCommandPrivate

VideoPlayerCommandPrivate(const VideoPlayerCommandPrivate &other)
{
for (auto player : other.m_playerProcs)
for (auto *player : other.m_playerProcs)
{
m_playerProcs.push_back(player->Clone());
}
Expand Down Expand Up @@ -330,7 +330,7 @@ class VideoPlayerCommandPrivate

void Play() const
{
for (auto player : m_playerProcs)
for (auto *player : m_playerProcs)
if (player->Play())
break;
}
Expand Down
2 changes: 1 addition & 1 deletion mythtv/programs/mythfrontend/viewschedulediff.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ void ViewScheduleDiff::showStatus(MythUIButtonListItem */*item*/)
message += " " + QObject::tr("The following programs will be recorded "
"instead:") + "\n\n";

for (auto pa : m_recListAfter)
for (auto *pa : m_recListAfter)
{
if (pa->GetRecordingStartTime() >= pi->GetRecordingEndTime())
break;
Expand Down
6 changes: 3 additions & 3 deletions mythtv/programs/mythmetadatalookup/lookup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ void LookerUpper::HandleAllRecordings(bool updaterules)

LoadFromRecorded( progList, false, inUseMap, isJobRunning, recMap, -1 );

for (auto pg : progList)
for (auto *pg : progList)
{
auto *pginfo = new ProgramInfo(*pg);
if ((pginfo->GetRecordingGroup() != "Deleted") &&
Expand Down Expand Up @@ -158,7 +158,7 @@ void LookerUpper::HandleAllArtwork(bool aggressive)

LoadFromRecorded( progList, false, inUseMap, isJobRunning, recMap, -1 );

for (auto pg : progList)
for (auto *pg : progList)
{
auto *pginfo = new ProgramInfo(*pg);

Expand Down Expand Up @@ -203,7 +203,7 @@ void LookerUpper::CopyRuleInetrefsToRecordings()

LoadFromRecorded( progList, false, inUseMap, isJobRunning, recMap, -1 );

for (auto pg : progList)
for (auto *pg : progList)
{
auto *pginfo = new ProgramInfo(*pg);
if (pginfo && pginfo->GetInetRef().isEmpty())
Expand Down
6 changes: 3 additions & 3 deletions mythtv/programs/mythutil/recordingutils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ static int CheckRecordings(const MythUtilCommandLineParser &cmdline)
cout << endl << endl;
cout << "MISSING RECORDINGS" << endl;
cout << "------------------" << endl;
for (auto p : missingRecordings)
for (auto *p : missingRecordings)
{
cout << qPrintable(CreateProgramInfoString(*p)) << endl;
cout << qPrintable(p->GetPlaybackURL()) << endl;
Expand All @@ -192,7 +192,7 @@ static int CheckRecordings(const MythUtilCommandLineParser &cmdline)
cout << endl << endl;
cout << "ZERO BYTE RECORDINGS" << endl;
cout << "--------------------" << endl;
for (auto p : zeroByteRecordings)
for (auto *p : zeroByteRecordings)
{
cout << qPrintable(CreateProgramInfoString(*p)) << endl;
cout << qPrintable(p->GetPlaybackURL()) << endl;
Expand All @@ -205,7 +205,7 @@ static int CheckRecordings(const MythUtilCommandLineParser &cmdline)
cout << endl << endl;
cout << "NO SEEKTABLE RECORDINGS" << endl;
cout << "-----------------------" << endl;
for (auto p : noSeektableRecordings)
for (auto *p : noSeektableRecordings)
{
cout << qPrintable(CreateProgramInfoString(*p)) << endl;
cout << qPrintable(p->GetPlaybackURL()) << endl;
Expand Down
22 changes: 11 additions & 11 deletions mythtv/programs/mythwelcome/welcomesettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

static StandardSetting *DailyWakeupStart(const QString& n)
{
auto gc = new GlobalTimeBoxSetting("DailyWakeupStartPeriod" + n, "00:00");
auto *gc = new GlobalTimeBoxSetting("DailyWakeupStartPeriod" + n, "00:00");
gc->setLabel(TR("Period %1 start time").arg(n));
gc->setHelpText(TR("Period %1 start time. "
"Defines a period the master backend should be awake. "
Expand All @@ -30,7 +30,7 @@ static StandardSetting *DailyWakeupEnd(const QString& n)

static StandardSetting *DailyWakeup(const QString& n)
{
auto gc = new GroupSetting();
auto *gc = new GroupSetting();

gc->setLabel(TR("Daily Wakeup/ShutDown Period %1").arg(n));
gc->addChild(DailyWakeupStart(n));
Expand All @@ -40,7 +40,7 @@ static StandardSetting *DailyWakeup(const QString& n)

static StandardSetting *AutoStartFrontend()
{
auto gc = new HostCheckBoxSetting("AutoStartFrontend");
auto *gc = new HostCheckBoxSetting("AutoStartFrontend");
gc->setLabel(TR("Automatically Start mythfrontend"));
gc->setValue(true);
gc->setHelpText(TR("Mythwelcome will automatically "
Expand All @@ -51,7 +51,7 @@ static StandardSetting *AutoStartFrontend()

static StandardSetting *ShutdownWithBE()
{
auto gc = new HostCheckBoxSetting("ShutdownWithMasterBE");
auto *gc = new HostCheckBoxSetting("ShutdownWithMasterBE");
gc->setLabel(TR("Shutdown with Master Backend"));
gc->setValue(false);
gc->setHelpText(TR("Mythwelcome will automatically "
Expand Down Expand Up @@ -83,7 +83,7 @@ MythWelcomeSettings::MythWelcomeSettings()

static StandardSetting *MythShutdownNvramCmd()
{
auto gc = new HostTextEditSetting("MythShutdownNvramCmd");
auto *gc = new HostTextEditSetting("MythShutdownNvramCmd");
gc->setLabel(TR("Command to Set Wakeup Time"));
gc->setValue("/usr/bin/nvram-wakeup --settime $time");
gc->setHelpText(TR("Command to set the wakeup time "
Expand All @@ -93,7 +93,7 @@ static StandardSetting *MythShutdownNvramCmd()

static StandardSetting *WakeupTimeFormat()
{
auto gc = new HostComboBoxSetting("MythShutdownWakeupTimeFmt", true);
auto *gc = new HostComboBoxSetting("MythShutdownWakeupTimeFmt", true);
gc->setLabel(TR("Wakeup time format"));
gc->addSelection("time_t");
gc->addSelection("yyyy-MM-dd hh:mm:ss");
Expand All @@ -107,7 +107,7 @@ static StandardSetting *WakeupTimeFormat()

static StandardSetting *MythShutdownNvramRestartCmd()
{
auto gc = new HostTextEditSetting("MythShutdownNvramRestartCmd");
auto *gc = new HostTextEditSetting("MythShutdownNvramRestartCmd");
gc->setLabel(TR("nvram-wakeup Restart Command"));
gc->setValue("/sbin/grub-set-default 1");
gc->setHelpText(TR("Command to run if your bios "
Expand All @@ -120,7 +120,7 @@ static StandardSetting *MythShutdownNvramRestartCmd()

static StandardSetting *MythShutdownReboot()
{
auto gc = new HostTextEditSetting("MythShutdownReboot");
auto *gc = new HostTextEditSetting("MythShutdownReboot");
gc->setLabel(TR("Command to reboot"));
gc->setValue("/sbin/reboot");
gc->setHelpText(TR("Command to reboot computer."));
Expand All @@ -129,7 +129,7 @@ static StandardSetting *MythShutdownReboot()

static StandardSetting *MythShutdownPowerOff()
{
auto gc = new HostTextEditSetting("MythShutdownPowerOff");
auto *gc = new HostTextEditSetting("MythShutdownPowerOff");
gc->setLabel(TR("Command to shutdown"));
gc->setValue("/sbin/poweroff");
gc->setHelpText(TR("Command to shutdown computer."));
Expand All @@ -138,7 +138,7 @@ static StandardSetting *MythShutdownPowerOff()

static StandardSetting *MythShutdownStartFECmd()
{
auto gc = new HostTextEditSetting("MythWelcomeStartFECmd");
auto *gc = new HostTextEditSetting("MythWelcomeStartFECmd");
gc->setLabel(TR("Command to run to start the Frontend"));
gc->setValue(GetAppBinDir() + "mythfrontend");
gc->setHelpText(TR("Command to start mythfrontend."));
Expand All @@ -147,7 +147,7 @@ static StandardSetting *MythShutdownStartFECmd()

static StandardSetting *MythShutdownXTermCmd()
{
auto gc = new HostTextEditSetting("MythShutdownXTermCmd");
auto *gc = new HostTextEditSetting("MythShutdownXTermCmd");
gc->setLabel(TR("Command to run Xterm"));
gc->setValue("xterm");
gc->setHelpText(TR("Command to start an Xterm. Can "
Expand Down