diff --git a/launcher/core/injector/lldbinjector.cpp b/launcher/core/injector/lldbinjector.cpp index 44e82daf3f..acdfd9d134 100644 --- a/launcher/core/injector/lldbinjector.cpp +++ b/launcher/core/injector/lldbinjector.cpp @@ -38,7 +38,7 @@ bool LldbInjector::selfTest() const QString output = QString::fromLocal8Bit(process.readAll()).trimmed(); const auto targetMajor = 3; const auto targetMinor = 6; - const QRegularExpression rx(QStringLiteral("\\b([\\d]+\\.[\\d]+\\.[\\d]+)\\b")); // lldb version 3.7.0 ( revision ) + static const QRegularExpression rx(QStringLiteral("\\b([\\d]+\\.[\\d]+\\.[\\d]+)\\b")); // lldb version 3.7.0 ( revision ) const auto match = rx.match(output); if (!match.hasMatch()) { diff --git a/launcher/core/launcher.cpp b/launcher/core/launcher.cpp index 59857131c7..a66cbb5757 100644 --- a/launcher/core/launcher.cpp +++ b/launcher/core/launcher.cpp @@ -92,7 +92,7 @@ Launcher::Launcher(const LaunchOptions &options, QObject *parent) { Q_ASSERT(options.isValid()); - const auto timeout = qgetenv("GAMMARAY_LAUNCHER_TIMEOUT").toInt(); + const auto timeout = qEnvironmentVariableIntValue("GAMMARAY_LAUNCHER_TIMEOUT"); d->safetyTimer.setInterval(std::max(60, timeout) * 1000); d->safetyTimer.setSingleShot(true); connect(&d->safetyTimer, &QTimer::timeout, this, &Launcher::timeout); diff --git a/launcher/ui/connectpage.cpp b/launcher/ui/connectpage.cpp index 92ade20402..17be787e27 100644 --- a/launcher/ui/connectpage.cpp +++ b/launcher/ui/connectpage.cpp @@ -76,7 +76,7 @@ void ConnectPage::validateHostAddress(const QString &address) handleLocalAddress(stillToParse, correctSoFar); handleIPAddress(stillToParse, correctSoFar); - QRegularExpression re(QStringLiteral("^([a-zA-Z][a-zA-Z0-9\\-\\.]+[a-zA-Z0-9](:[0-9]{1,5})?)$")); + static QRegularExpression re(QStringLiteral("^([a-zA-Z][a-zA-Z0-9\\-\\.]+[a-zA-Z0-9](:[0-9]{1,5})?)$")); if (re.match(stillToParse).hasMatch()) handleHostName(stillToParse); @@ -130,13 +130,13 @@ void ConnectPage::handleIPAddress(QString &stillToParse, bool &correctSoFar) possibleIPv6Address = QHostAddress(stillToParse); QHostAddress possibleIPv6BracketAddress; - QRegularExpression bracketFormatRE(QStringLiteral(R"(^\[([0-9a-f\:\.]*)\].*$)")); + static QRegularExpression bracketFormatRE(QStringLiteral(R"(^\[([0-9a-f\:\.]*)\].*$)")); QRegularExpressionMatch bracketMatch = bracketFormatRE.match(stillToParse); if (bracketMatch.hasMatch()) possibleIPv6BracketAddress = QHostAddress(bracketMatch.captured(1)); QHostAddress possibleIPv6InterfaceAddress; - QRegularExpression interfaceFormatRE(QStringLiteral(R"(^([^\%]*)(\%[^\:]+)(:[0-9]+)?$)")); + static QRegularExpression interfaceFormatRE(QStringLiteral(R"(^([^\%]*)(\%[^\:]+)(:[0-9]+)?$)")); QRegularExpressionMatch interfaceMatch = interfaceFormatRE.match(stillToParse); if (interfaceMatch.hasMatch()) possibleIPv6InterfaceAddress = QHostAddress(interfaceMatch.captured(1)); @@ -220,7 +220,7 @@ void ConnectPage::handleAddressAndPort(QString &stillToParse, bool &correctSoFar void ConnectPage::handlePortString(QString &stillToParse, bool &correctSoFar) { - QRegularExpression re(QStringLiteral("\\:[0-9]{1,5}")); + static QRegularExpression re(QStringLiteral("\\:[0-9]{1,5}")); QRegularExpressionMatch match = re.match(stillToParse); if (match.hasMatch()) { auto portString = match.captured(0); diff --git a/plugins/localeinspector/localeaccessormodel.h b/plugins/localeinspector/localeaccessormodel.h index 66e2e288cc..4be7824a68 100644 --- a/plugins/localeinspector/localeaccessormodel.h +++ b/plugins/localeinspector/localeaccessormodel.h @@ -26,12 +26,12 @@ struct LocaleDataAccessor; class LocaleAccessorModel : public QAbstractTableModel { Q_OBJECT - Q_ENUMS(CustomRoles) public: enum CustomRoles { AccessorRole = UserRole + 1 }; + Q_ENUM(CustomRoles) explicit LocaleAccessorModel(LocaleDataAccessorRegistry *registry, QObject *parent = nullptr); diff --git a/plugins/quickinspector/quickinspectorinterface.h b/plugins/quickinspector/quickinspectorinterface.h index f0b15cd3e3..96b4546a96 100644 --- a/plugins/quickinspector/quickinspectorinterface.h +++ b/plugins/quickinspector/quickinspectorinterface.h @@ -59,7 +59,7 @@ class QuickInspectorInterface : public QObject VisualizeTraces, }; - Q_ENUMS(RenderMode) + Q_ENUM(RenderMode) Q_DECLARE_FLAGS(Features, Feature) explicit QuickInspectorInterface(QObject *parent = nullptr);