From e24ebc6dc5382ad05077575d267f66efac39e8dd Mon Sep 17 00:00:00 2001 From: Kitsune Ral Date: Tue, 6 Sep 2016 18:36:40 +0900 Subject: Fix building with VS2013 VS2013 doesn't like 'using' statements if a base class has private constructors (as in QSettings - Q_DISABLE_COPY makes a copy constructor private and deleted). Hence a workaround. --- settings.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/settings.h b/settings.h index 005b6cef..7cc7895b 100644 --- a/settings.h +++ b/settings.h @@ -29,7 +29,13 @@ namespace QMatrixClient class Settings: public QSettings { public: +#if defined(_MSC_VER) && _MSC_VER <= 1200 + // VS 2013 (and probably older) aren't friends with 'using' statements + // that involve private constructors + explicit Settings(QObject* parent = 0) : QSettings(parent) { } +#else using QSettings::QSettings; +#endif virtual ~Settings(); Q_INVOKABLE void setValue(const QString &key, @@ -71,7 +77,7 @@ namespace QMatrixClient Q_PROPERTY(QString accessToken READ accessToken WRITE setAccessToken) public: template - AccountSettings(const QString& accountId, ArgTs... qsettingsArgs) + explicit AccountSettings(const QString& accountId, ArgTs... qsettingsArgs) : SettingsGroup("Accounts/" + accountId, qsettingsArgs...) { } virtual ~AccountSettings(); -- cgit v1.2.3