Skip to content

Commit

Permalink
fixed pedantic warning, double ;;
Browse files Browse the repository at this point in the history
  • Loading branch information
silverqx committed Feb 4, 2023
1 parent ccef0e5 commit 0f2b6d8
Show file tree
Hide file tree
Showing 9 changed files with 33 additions and 33 deletions.
2 changes: 1 addition & 1 deletion src/orm/databaseconnection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,7 @@ Q_GLOBAL_STATIC_WITH_ARGS(DriverNameMapType, DRIVER_NAME_MAP, ({
{QMYSQL, MYSQL_},
{QPSQL, POSTGRESQL},
{QSQLITE, SQLITE}
}));
}))

const QString &DatabaseConnection::driverNamePrintable()
{
Expand Down
6 changes: 3 additions & 3 deletions src/orm/utils/string.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ bool String::isNumber(const QStringView string, const bool allowFloating,
using SnakeCache = std::unordered_map<QString, QString>;

/*! Snake cache for already computed strings. */
Q_GLOBAL_STATIC(SnakeCache, snakeCache);
Q_GLOBAL_STATIC(SnakeCache, snakeCache)

QString String::snake(QString string, const QChar delimiter)
{
Expand Down Expand Up @@ -121,9 +121,9 @@ using StudlyCache = std::unordered_map<QString, QString>;
using CamelCache = std::unordered_map<QString, QString>;

/*! Studly cache for already computed strings. */
Q_GLOBAL_STATIC(StudlyCache, studlyCache);
Q_GLOBAL_STATIC(StudlyCache, studlyCache)
/*! Camel cache for already computed strings. */
Q_GLOBAL_STATIC(CamelCache, camelCache);
Q_GLOBAL_STATIC(CamelCache, camelCache)

QString String::camel(QString string)
{
Expand Down
2 changes: 1 addition & 1 deletion tests/TinyUtils/src/databases.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ namespace TestUtils
Tests don't fail but are skipped when a connection is not available. */

/*! DatabaseManager instance. */
Q_GLOBAL_STATIC_WITH_ARGS(std::shared_ptr<Orm::DatabaseManager>, db, {nullptr});
Q_GLOBAL_STATIC_WITH_ARGS(std::shared_ptr<Orm::DatabaseManager>, db, {nullptr})

/* public */

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,16 +140,16 @@ private Q_SLOTS:
};

/*! Time zone +02:00. */
Q_GLOBAL_STATIC_WITH_ARGS(QTimeZone, TimeZone0200, (QByteArray("UTC+02:00")));
Q_GLOBAL_STATIC_WITH_ARGS(QTimeZone, TimeZone0200, (QByteArray("UTC+02:00")))

/*! QString constant "datetimes" (perf. reason, one time initialization). */
Q_GLOBAL_STATIC_WITH_ARGS(QString, datetimes, ("datetimes"));
Q_GLOBAL_STATIC_WITH_ARGS(QString, datetimes, ("datetimes"))
/*! QString constant "datetime" (perf. reason, one time initialization). */
Q_GLOBAL_STATIC_WITH_ARGS(QString, datetime, ("datetime"));
Q_GLOBAL_STATIC_WITH_ARGS(QString, datetime, ("datetime"))
/*! QString constant "timestamp" (perf. reason, one time initialization). */
Q_GLOBAL_STATIC_WITH_ARGS(QString, timestamp, ("timestamp"));
Q_GLOBAL_STATIC_WITH_ARGS(QString, timestamp, ("timestamp"))
/*! QString constant "date" (perf. reason, one time initialization). */
Q_GLOBAL_STATIC_WITH_ARGS(QString, date, ("date"));
Q_GLOBAL_STATIC_WITH_ARGS(QString, date, ("date"))

/* private slots */

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,16 +134,16 @@ private Q_SLOTS:

/*! Time zone Europe/Bratislava. */
Q_GLOBAL_STATIC_WITH_ARGS(QTimeZone, TimeZoneEUBratislava,
(QByteArray("Europe/Bratislava")));
(QByteArray("Europe/Bratislava")))

/*! QString constant "datetimes" (perf. reason, one time initialization). */
Q_GLOBAL_STATIC_WITH_ARGS(QString, datetimes, ("datetimes"));
Q_GLOBAL_STATIC_WITH_ARGS(QString, datetimes, ("datetimes"))
/*! QString constant "datetime" (perf. reason, one time initialization). */
Q_GLOBAL_STATIC_WITH_ARGS(QString, datetime, ("datetime"));
Q_GLOBAL_STATIC_WITH_ARGS(QString, datetime, ("datetime"))
/*! QString constant "timestamp" (perf. reason, one time initialization). */
Q_GLOBAL_STATIC_WITH_ARGS(QString, timestamp, ("timestamp"));
Q_GLOBAL_STATIC_WITH_ARGS(QString, timestamp, ("timestamp"))
/*! QString constant "date" (perf. reason, one time initialization). */
Q_GLOBAL_STATIC_WITH_ARGS(QString, date, ("date"));
Q_GLOBAL_STATIC_WITH_ARGS(QString, date, ("date"))

/* private slots */

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,18 +128,18 @@ private Q_SLOTS:
the QVariant(QString).value<QDateTime>() and
QTimeZone(UTC+02) != QTimeZone(UTC+02:00). */
/*! Time zone +02 (reason for this is QTimeZone(UTC+02) != QTimeZone(UTC+02:00)). */
Q_GLOBAL_STATIC_WITH_ARGS(QTimeZone, TimeZone02, (QByteArray("UTC+02")));
Q_GLOBAL_STATIC_WITH_ARGS(QTimeZone, TimeZone02, (QByteArray("UTC+02")))
/*! Time zone +02:00. */
Q_GLOBAL_STATIC_WITH_ARGS(QTimeZone, TimeZone0200, (QByteArray("UTC+02")));
Q_GLOBAL_STATIC_WITH_ARGS(QTimeZone, TimeZone0200, (QByteArray("UTC+02")))

/*! QString constant "datetimes" (perf. reason, one time initialization). */
Q_GLOBAL_STATIC_WITH_ARGS(QString, datetimes, ("datetimes"));
Q_GLOBAL_STATIC_WITH_ARGS(QString, datetimes, ("datetimes"))
/*! QString constant "datetime" (perf. reason, one time initialization). */
Q_GLOBAL_STATIC_WITH_ARGS(QString, datetime, ("datetime"));
Q_GLOBAL_STATIC_WITH_ARGS(QString, datetime, ("datetime"))
/*! QString constant "timestamp" (perf. reason, one time initialization). */
Q_GLOBAL_STATIC_WITH_ARGS(QString, timestamp, ("timestamp"));
Q_GLOBAL_STATIC_WITH_ARGS(QString, timestamp, ("timestamp"))
/*! QString constant "date" (perf. reason, one time initialization). */
Q_GLOBAL_STATIC_WITH_ARGS(QString, date, ("date"));
Q_GLOBAL_STATIC_WITH_ARGS(QString, date, ("date"))

/* private slots */

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,11 @@ private Q_SLOTS:
};

/*! QString constant "datetime" (perf. reason, one time initialization). */
Q_GLOBAL_STATIC_WITH_ARGS(QString, datetime_, ("datetime"));
Q_GLOBAL_STATIC_WITH_ARGS(QString, datetime_, ("datetime"))
/*! QString constant "timestamp" (perf. reason, one time initialization). */
Q_GLOBAL_STATIC_WITH_ARGS(QString, timestamp, ("timestamp"));
Q_GLOBAL_STATIC_WITH_ARGS(QString, timestamp, ("timestamp"))
/*! QString constant "date" (perf. reason, one time initialization). */
Q_GLOBAL_STATIC_WITH_ARGS(QString, date, ("date"));
Q_GLOBAL_STATIC_WITH_ARGS(QString, date, ("date"))

/* private slots */

Expand Down Expand Up @@ -1371,11 +1371,11 @@ void tst_Model_QDateTime::set0200Timezone(const QString &connection)
}

/*! Time zone +02:00 for MySQL. */
Q_GLOBAL_STATIC_WITH_ARGS(QTimeZone, TimeZone0200, (QByteArray("UTC+02:00")));
Q_GLOBAL_STATIC_WITH_ARGS(QTimeZone, TimeZone0200, (QByteArray("UTC+02:00")))

/*! Time zone Europe/Bratislava for PostgreSQL. */
Q_GLOBAL_STATIC_WITH_ARGS(QTimeZone, TimeZoneEUBratislava,
(QByteArray("Europe/Bratislava")));
(QByteArray("Europe/Bratislava")))

void tst_Model_QDateTime::set0200TimezoneForMySQL(const QString &connection)
{
Expand Down
2 changes: 1 addition & 1 deletion tests/auto/functional/others/version/tst_version.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ private Q_SLOTS:

#if defined(_WIN32) && defined(TINYTEST_VERSION_IS_SHARED_BUILD)
/*! Executables copyright, all executables have the same LegalCopyright. */
Q_GLOBAL_STATIC_WITH_ARGS(QString, CopyRight, ("Copyright (Β©) 2022 Crystal Studio"));
Q_GLOBAL_STATIC_WITH_ARGS(QString, CopyRight, ("Copyright (Β©) 2022 Crystal Studio"))
#endif

// NOLINTBEGIN(readability-convert-member-functions-to-static)
Expand Down
12 changes: 6 additions & 6 deletions tom/src/tom/commands/integratecommand.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -150,11 +150,11 @@ namespace
/*! Template string for tab-completion installed successfully. */
Q_GLOBAL_STATIC_WITH_ARGS(
QString, IntegrateSuccessTmpl,
("Tab-completion for the %1 shell was successfully registered. πŸŽ‰"));
("Tab-completion for the %1 shell was successfully registered. πŸŽ‰"))
/*! Template string for tab-completion already registered. */
Q_GLOBAL_STATIC_WITH_ARGS(
QString, IntegrateAlreadyRegisteredTmpl,
("Tab-completion for the %1 shell is already registered. πŸ™Œ"));
("Tab-completion for the %1 shell is already registered. πŸ™Œ"))

int IntegrateCommand::integratePwsh() const
{
Expand Down Expand Up @@ -284,11 +284,11 @@ int IntegrateCommand::integrateBash() const

/*! Bash completions directory path. */
Q_GLOBAL_STATIC_WITH_ARGS(QString, BashCompletionsDirPath,
("/usr/share/bash-completion/completions"));
("/usr/share/bash-completion/completions"))

/*! Path to the TinyORM tom bash completion file. */
Q_GLOBAL_STATIC_WITH_ARGS(QString, TomBashCompletionFilepath,
(QString("%1/tom").arg(*BashCompletionsDirPath)));
(QString("%1/tom").arg(*BashCompletionsDirPath)))

void IntegrateCommand::throwIfBashCompletionDirNotExists()
{
Expand Down Expand Up @@ -359,7 +359,7 @@ int IntegrateCommand::integrateZsh() const
/*! Zsh completions directory path. */
Q_GLOBAL_STATIC_WITH_ARGS(QStringList, ZshCompletionsDirPaths,
({"/usr/local/share/zsh/site-functions",
"/usr/share/zsh/site-functions"}));
"/usr/share/zsh/site-functions"}))

/*! Zsh completion files structure holds parent directory path and also filepath. */
struct ZshCompletionPathsItem
Expand All @@ -376,7 +376,7 @@ Q_GLOBAL_STATIC_WITH_ARGS(
({{ZshCompletionsDirPaths->constFirst(),
QString("%1/_tom").arg(ZshCompletionsDirPaths->constFirst())},
{ZshCompletionsDirPaths->at(1),
QString("%1/_tom").arg(ZshCompletionsDirPaths->at(1))}}));
QString("%1/_tom").arg(ZshCompletionsDirPaths->at(1))}}))

bool IntegrateCommand::writeTomZshCompletionWrapper() const
{
Expand Down

0 comments on commit 0f2b6d8

Please sign in to comment.