aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md4
-rw-r--r--lib/settings.h6
-rw-r--r--lib/ssosession.cpp5
-rw-r--r--lib/util.cpp4
-rw-r--r--libquotient.pri2
-rw-r--r--quotest.pro5
6 files changed, 17 insertions, 9 deletions
diff --git a/README.md b/README.md
index 65fc2217..7dbb5dbc 100644
--- a/README.md
+++ b/README.md
@@ -211,7 +211,7 @@ QT_LOGGING_RULES="libqmatrixclient.*.debug=true;libqmatrixclient.jobs.debug=fals
In case of troubles with room state and caching it may be useful to switch
cache format from binary to JSON. To do that, set the following value in
your client's configuration file/registry key (you might need to create
-the libqmatrixclient key for that): `libqmatrixclient/cache_type` to `json`.
+the libQuotient key for that): `libQuotient/cache_type` to `json`.
This will make cache saving and loading work slightly slower but the cache
-will be in a text JSON file (very long and unindented so prepare a good
+will be in text JSON files (possibly very long and unindented so prepare a good
JSON viewer or text editor with JSON formatting capabilities).
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
diff --git a/libquotient.pri b/libquotient.pri
index dc109d79..494a163a 100644
--- a/libquotient.pri
+++ b/libquotient.pri
@@ -1,4 +1,6 @@
QT += network multimedia
+QT -= gui
+
# TODO: Having moved to Qt 5.12, replace c++1z with c++17 below
CONFIG *= c++1z warn_on rtti_off create_prl object_parallel_to_source
diff --git a/quotest.pro b/quotest.pro
index 433a2ccc..891873af 100644
--- a/quotest.pro
+++ b/quotest.pro
@@ -1,12 +1,13 @@
TEMPLATE = app
+include(libquotient.pri)
+
QT += testlib
+
CONFIG *= c++1z warn_on object_parallel_to_source
windows { CONFIG *= console }
-include(libquotient.pri)
-
SOURCES += tests/quotest.cpp
DISTFILES += \