clang-tidy: Force braces around statements

This commit is contained in:
Alexander Lohnau 2021-03-19 08:54:50 +01:00
parent 854742efcc
commit a5df3ebdcb
No known key found for this signature in database
GPG key ID: 6C45BA731AA2ED36
2 changed files with 6 additions and 3 deletions

View file

@ -158,8 +158,9 @@ void ApplicationListModel::loadApplications()
m_applicationList.clear();
KServiceGroup::Ptr group = KServiceGroup::root();
if (!group || !group->isValid())
if (!group || !group->isValid()) {
return;
}
KServiceGroup::List subGroupList = group->entries(true);
QMap<int, ApplicationData> orderedList;
@ -278,8 +279,9 @@ QVariant ApplicationListModel::data(const QModelIndex &index, int role) const
Qt::ItemFlags ApplicationListModel::flags(const QModelIndex &index) const
{
if (!index.isValid())
if (!index.isValid()) {
return {};
}
return Qt::ItemIsDragEnabled | QAbstractListModel::flags(index);
}

View file

@ -8,8 +8,9 @@ int main(int argc, char *argv[])
QQmlApplicationEngine engine;
engine.load(QUrl(QLatin1String("qrc:/main.qml")));
if (engine.rootObjects().isEmpty())
if (engine.rootObjects().isEmpty()) {
return -1;
}
return app.exec();
}