mark some QSettings warning cases as unlikely

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2020-12-28 17:16:18 +02:00
parent 1621160d34
commit 0aac6601ca

View file

@ -982,7 +982,7 @@ void QSettings::beginGroup(const QString &group)
{
Q_D(QSettings);
if (!d->group.isEmpty()) {
if (Q_UNLIKELY(!d->group.isEmpty())) {
qWarning("QSettings::beginGroup: sub-groups are not supported");
return;
}
@ -999,7 +999,7 @@ void QSettings::beginGroup(const QString &group)
void QSettings::endGroup()
{
Q_D(QSettings);
if (d->group.isEmpty()) {
if (Q_UNLIKELY(d->group.isEmpty())) {
qWarning("QSettings::endGroup: No matching beginGroup()");
return;
}