diff --git a/include/orm/tiny/tinybuilder.hpp b/include/orm/tiny/tinybuilder.hpp index 9bf9d531c..057346b1a 100644 --- a/include/orm/tiny/tinybuilder.hpp +++ b/include/orm/tiny/tinybuilder.hpp @@ -1313,7 +1313,11 @@ namespace Orm::Tiny progress.reserve(names.size()); for (auto &&segment : names) { +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) + progress << segment; +#else progress << std::move(segment); +#endif auto last = progress.join(DOT); const auto containsRelation = [&last](const auto &relation) diff --git a/include/orm/utils/query.hpp b/include/orm/utils/query.hpp index b778dd38d..b45aed309 100644 --- a/include/orm/utils/query.hpp +++ b/include/orm/utils/query.hpp @@ -105,7 +105,11 @@ namespace Orm::Utils queryString.replace(queryString.indexOf(QLatin1Char('?')), 1, bindingValue); if (simpleBindings) - simpleBindingsList << std::move(bindingValue); // clazy:exclude=reserve-candidates +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) + simpleBindingsList << bindingValue; +#else + simpleBindingsList << std::move(bindingValue); +#endif } return {std::move(queryString), std::move(simpleBindingsList)}; diff --git a/src/orm/exceptions/sqlerror.cpp b/src/orm/exceptions/sqlerror.cpp index 740d2f872..c0b60436d 100644 --- a/src/orm/exceptions/sqlerror.cpp +++ b/src/orm/exceptions/sqlerror.cpp @@ -49,13 +49,25 @@ QString SqlError::formatMessage(const char *message, const QSqlError &error) errorText.reserve(3); if (!nativeErrorCode.isEmpty()) +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) + errorText << nativeErrorCode; +#else errorText << std::move(nativeErrorCode); +#endif if (!driverText.isEmpty()) +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) + errorText << driverText; +#else errorText << std::move(driverText); +#endif if (!databaseText.isEmpty()) +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) + errorText << databaseText; +#else errorText << std::move(databaseText); +#endif result += errorText.join(COMMA); diff --git a/src/orm/schema/blueprint.cpp b/src/orm/schema/blueprint.cpp index a07d36448..f937a69ec 100644 --- a/src/orm/schema/blueprint.cpp +++ b/src/orm/schema/blueprint.cpp @@ -63,7 +63,11 @@ QVector Blueprint::toSql(const DatabaseConnection &connection, if (auto sql = grammar.invokeCompileMethod(*command, connection, *this); !sql.isEmpty() ) +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) + statements << sql; +#else statements << std::move(sql); +#endif return statements; } diff --git a/src/orm/types/sqlquery.cpp b/src/orm/types/sqlquery.cpp index 0b0c963b9..79695be8b 100644 --- a/src/orm/types/sqlquery.cpp +++ b/src/orm/types/sqlquery.cpp @@ -18,7 +18,11 @@ SqlQuery::SqlQuery(QSqlQuery &&other, const QtTimeZoneConfig &qtTimeZone, // NOL const QueryGrammar &queryGrammar, const std::optional returnQDateTime ) +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) + : QSqlQuery(other) +#else : QSqlQuery(std::move(other)) +#endif , m_qtTimeZone(qtTimeZone) , m_isConvertingTimeZone(m_qtTimeZone.type != QtTimeZoneType::DontConvert) , m_isSQLiteDb(driver()->dbmsType() == QSqlDriver::DbmsType::SQLite) diff --git a/tom/src/tom/application.cpp b/tom/src/tom/application.cpp index d271f5e6e..e1e9453c9 100644 --- a/tom/src/tom/application.cpp +++ b/tom/src/tom/application.cpp @@ -316,7 +316,11 @@ void Application::prependOptions(QList &&options) m_options = std::move(options); // Common options after Command options +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) + m_options << commonOptions; +#else m_options << std::move(commonOptions); +#endif } /* Run command */ diff --git a/tom/src/tom/commands/command.cpp b/tom/src/tom/commands/command.cpp index ef5b0303c..dea280954 100644 --- a/tom/src/tom/commands/command.cpp +++ b/tom/src/tom/commands/command.cpp @@ -221,7 +221,11 @@ QStringList Command::values(const QString &name) const // Support passing more values delimited by comma for (auto &&value : values) { if (!value.contains(regex)) { +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) + valuesSplitted << value; +#else valuesSplitted << std::move(value); +#endif continue; } diff --git a/tom/src/tom/commands/completecommand.cpp b/tom/src/tom/commands/completecommand.cpp index e728efa13..61c5737b0 100644 --- a/tom/src/tom/commands/completecommand.cpp +++ b/tom/src/tom/commands/completecommand.cpp @@ -255,8 +255,12 @@ int CompleteCommand::printGuessedCommands( #ifdef _MSC_VER guessedCommands << QStringLiteral("%1;%2;%3").arg(commandName, commandName, command->description()); +#else +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) + guessedCommands << commandName; #else guessedCommands << std::move(commandName); +#endif #endif } @@ -414,8 +418,12 @@ int CompleteCommand::printGuessedLongOptions( #ifdef _MSC_VER options << QStringLiteral("%1;%2;%3").arg(longOption, longOption, option.description()); +#else +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) + options << longOption; #else options << std::move(longOption); +#endif #endif } // With a value @@ -431,8 +439,12 @@ int CompleteCommand::printGuessedLongOptions( .arg(longOption, longOptionList, option.description(), getOptionDefaultValue(option)); +#else +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) + options << longOption; #else options << std::move(longOption); +#endif #endif } } diff --git a/tom/src/tom/concerns/callscommands.cpp b/tom/src/tom/concerns/callscommands.cpp index 035117041..52c08c782 100644 --- a/tom/src/tom/concerns/callscommands.cpp +++ b/tom/src/tom/concerns/callscommands.cpp @@ -60,7 +60,11 @@ CallsCommands::createCommandLineArguments( newArguments.reserve(currentArguments.size() + arguments.size()); // Absolute path of the exe name +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) + newArguments << currentArguments.constFirst(); +#else newArguments << std::move(currentArguments.first()); +#endif // Command name newArguments << command; diff --git a/tom/src/tom/concerns/interactswithio.cpp b/tom/src/tom/concerns/interactswithio.cpp index cb1b23b3d..7227db8c8 100644 --- a/tom/src/tom/concerns/interactswithio.cpp +++ b/tom/src/tom/concerns/interactswithio.cpp @@ -494,7 +494,11 @@ QString InteractsWithIO::errorWallInternal(const QString &string) const // Split lines by the given width for (const auto &lineNl : splitted) for (auto &&line : StringUtils::splitStringByWidth(lineNl, maxLineWidth)) +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) + lines << line; +#else lines << std::move(line); +#endif } QString output; diff --git a/tom/src/tom/tomutils.cpp b/tom/src/tom/tomutils.cpp index ef6e4f7e4..8d1b81b11 100644 --- a/tom/src/tom/tomutils.cpp +++ b/tom/src/tom/tomutils.cpp @@ -84,7 +84,11 @@ Utils::convertToQCommandLineOptionList(QList &&options) result.reserve(options.size()); for (auto &&option : options) +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) + result << option; +#else result << std::move(option); +#endif return result; }