fix Warning
This commit is contained in:
1 parent
593c221d23
commit
8345470273
316 files changed
+1246
-929
No files matched your search
+5
-4
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
#include "handler_base_download.h"
|
||||
#include <utility>
|
||||
|
||||
#include <QStringList>
|
||||
#include <QSettings>
|
||||
@@ -1126,7 +1127,7 @@ void HandlerBaseDownload::removeOldExercises()
|
||||
}
|
||||
QVector<ExerciseManagement::Database::ExmExercise> exercises;
|
||||
exmDbHandler->db()->select(exercises);
|
||||
for (const auto &ex : qAsConst(exercises))
|
||||
for (const auto &ex : std::as_const(exercises))
|
||||
{
|
||||
if (m_exTblGen->dropExerciseSchema(ex.id, false))
|
||||
continue;
|
||||
@@ -1718,7 +1719,7 @@ void HandlerBaseDownload::copyFromOldDatabase()
|
||||
//TODO: add more tables if needed, check data in these tables, z.B. in rec_equipment_position.equipment_number is always negative (?!)
|
||||
|
||||
DBTransaction trans(m_dbConnection);
|
||||
for (const QString &table : qAsConst(tableList))
|
||||
for (const QString &table : std::as_const(tableList))
|
||||
{
|
||||
if (!copyTable(dbIn, m_dbConnection, table))
|
||||
ERROR_LOG(m_logger) << "Failed to copy table " << table;
|
||||
@@ -1852,7 +1853,7 @@ void HandlerBaseDownload::copyOldFlmData(const QSqlDatabase &dbIn, const QSqlDat
|
||||
QVector<Database::FlmFolder> flmFolderData;
|
||||
dbIfcNew->select(flmFolderData);
|
||||
qint64 folderId = -1;
|
||||
for (const auto &folder : qAsConst(flmFolderData))
|
||||
for (const auto &folder : std::as_const(flmFolderData))
|
||||
{
|
||||
if (folder.name == QStringLiteral("Snapshots"))
|
||||
{
|
||||
@@ -1868,7 +1869,7 @@ void HandlerBaseDownload::copyOldFlmData(const QSqlDatabase &dbIn, const QSqlDat
|
||||
|
||||
if (folderId > 0) // found Snapshots folder for the exercise id
|
||||
{
|
||||
for (auto data : qAsConst(flmData))
|
||||
for (auto data : std::as_const(flmData))
|
||||
{
|
||||
if (data.folderId == folderId || //snapshots
|
||||
(data.fileTypeId == FileManagement::FileType::Pdf)) //old PDF
|
||||
|
||||
Reference in new issue
Block a user