fix Warning
This commit is contained in:
1 parent
593c221d23
commit
8345470273
316 files changed
+1246
-929
No files matched your search
@@ -8,6 +8,7 @@
|
||||
*/
|
||||
|
||||
#include "copy_exercise.h"
|
||||
#include <utility>
|
||||
|
||||
#include <ngldb/dbcommon.h>
|
||||
#include <ngldb/dbconnection.h>
|
||||
@@ -473,7 +474,7 @@ void CopyExercise::onPsqlFinishedForAAR(int exitCode, QProcess::ExitStatus exitS
|
||||
const QString schema = DBCommon::getExerciseSchemaName(m_exerciseId);
|
||||
QStringList downloadScriptIds;
|
||||
downloadScriptIds.reserve(m_downloadScriptIds.size());
|
||||
for (int id : qAsConst(m_downloadScriptIds))
|
||||
for (int id : std::as_const(m_downloadScriptIds))
|
||||
downloadScriptIds.push_back(QString::number(id));
|
||||
|
||||
QString stmt = QLatin1String("DELETE FROM ") + schema + QLatin1String(".pre_presentation WHERE id not in (") + downloadScriptIds.join(QLatin1Char(',')) + QLatin1Char(')');
|
||||
|
||||
+3
-2
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
#include "exercise_table_generator.h"
|
||||
#include <utility>
|
||||
|
||||
#include <ngldb/nsqlquery.h>
|
||||
#include <ngldb/dbtransaction.h>
|
||||
@@ -450,7 +451,7 @@ bool ExerciseTableGenerator::executeSqlTableRelated(const QString &svcName, cons
|
||||
}
|
||||
|
||||
bool ok = true;
|
||||
for (const QString &table : qAsConst(tablesNewlyCreated))
|
||||
for (const QString &table : std::as_const(tablesNewlyCreated))
|
||||
{
|
||||
if (!insertTableData(table, dbSchema, sqlGen))
|
||||
{
|
||||
@@ -511,7 +512,7 @@ void ExerciseTableGenerator::checkAliveTimer()
|
||||
// --------------------------------------------------------------------------------------------------------
|
||||
void ExerciseTableGenerator::generateSqlDataForExercise(int exerciseId)
|
||||
{
|
||||
for (CodeGen::SqlGenerator *sqlGen : qAsConst(m_sqlGeneratorMap))
|
||||
for (CodeGen::SqlGenerator *sqlGen : std::as_const(m_sqlGeneratorMap))
|
||||
{
|
||||
// recreate sql statement with correct schema name (e.g. for serials)
|
||||
if (!sqlGen->generateData(exerciseId))
|
||||
|
||||
Reference in new issue
Block a user