set(QtScript_COMPONENT "")
set(QT_MIN_VERSION "6.10.0")
+# Held back due to QSqlQuery
add_compile_definitions("QT_DISABLE_DEPRECATED_UP_TO=QT_VERSION_CHECK(6, 1, 0)")
add_subdirectory(localmylist)
void PendingRequestTab::resetFailCount()
{
- QList<LocalMyList::PendingRequest> requests = selectionToPendingRequestList();
+ const auto &requests = selectionToPendingRequestList();
if (!requests.count())
return;
{
LocalMyList::RaiiTransaction t(LocalMyList::instance()->database());
- for (const LocalMyList::PendingRequest &request :
- std::as_const(requests))
+ for (const LocalMyList::PendingRequest &request : requests)
{
LocalMyList::instance()->database()->resetPendingRequest(request);
}
QList<LocalMyList::PendingRequest> PendingRequestTab::selectionToPendingRequestList()
{
QList<LocalMyList::PendingRequest> ret;
- QModelIndexList selection = ui->view->selectionModel()->selectedRows();
+ const QModelIndexList selection =
+ ui->view->selectionModel()->selectedRows();
- for (const QModelIndex &idx : std::as_const(selection))
+ for (const QModelIndex &idx : selection)
{
LocalMyList::PendingRequest pr;
pr.aid = idx.data().toInt();
if (!ret.endsWith(QChar('/')))
ret.append(QChar('/'));
- ret.append(path.mid(prefix.length()));
+ ret.append(QStringView{path}.mid(prefix.length()));
return ret;
}
if (!ret.endsWith(QChar('/')))
ret.append(QChar('/'));
- ret.append(path.mid(prefix.length()));
+ ret.append(QStringView{path}.mid(prefix.length()));
if (sourceHost)
*sourceHost = pm.sourceHost;