diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/settings.h | 6 | ||||
-rw-r--r-- | lib/ssosession.cpp | 5 | ||||
-rw-r--r-- | lib/util.cpp | 4 |
3 files changed, 10 insertions, 5 deletions
diff --git a/lib/settings.h b/lib/settings.h index 5a097285..c45764a6 100644 --- a/lib/settings.h +++ b/lib/settings.h @@ -25,6 +25,7 @@ class QVariant; namespace Quotient { + class Settings : public QSettings { Q_OBJECT public: @@ -151,8 +152,9 @@ class AccountSettings : public SettingsGroup { WRITE setEncryptionAccountPickle) public: template <typename... ArgTs> - explicit AccountSettings(const QString& accountId, ArgTs... qsettingsArgs) - : SettingsGroup("Accounts/" + accountId, qsettingsArgs...) + explicit AccountSettings(const QString& accountId, ArgTs&&... qsettingsArgs) + : SettingsGroup("Accounts/" + accountId, + std::forward<ArgTs>(qsettingsArgs)...) {} QString userId() const; diff --git a/lib/ssosession.cpp b/lib/ssosession.cpp index 0f8f96e1..be701204 100644 --- a/lib/ssosession.cpp +++ b/lib/ssosession.cpp @@ -10,7 +10,8 @@ using namespace Quotient; -struct SsoSession::Private { +class SsoSession::Private { +public: Private(SsoSession* q, const QString& initialDeviceName = {}, const QString& deviceId = {}, Connection* connection = nullptr) : initialDeviceName(initialDeviceName) @@ -38,7 +39,7 @@ struct SsoSession::Private { processCallback(); }); QObject::connect(socket, &QTcpSocket::disconnected, socket, - [this] { socket->deleteLater(); }); + &QTcpSocket::deleteLater); }); } void processCallback(); diff --git a/lib/util.cpp b/lib/util.cpp index 4cbebfe2..61661de8 100644 --- a/lib/util.cpp +++ b/lib/util.cpp @@ -28,7 +28,9 @@ static const auto RegExpOptions = QRegularExpression::CaseInsensitiveOption - | QRegularExpression::OptimizeOnFirstUsageOption +#if QT_VERSION < QT_VERSION_CHECK(5, 12, 0) + | QRegularExpression::OptimizeOnFirstUsageOption // Default since 5.12 +#endif | QRegularExpression::UseUnicodePropertiesOption; // Converts all that looks like a URL into HTML links |