aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2016-09-06 18:36:40 +0900
committerKitsune Ral <Kitsune-Ral@users.sf.net>2016-09-06 21:43:36 +0900
commite24ebc6dc5382ad05077575d267f66efac39e8dd (patch)
tree215ecbf856d8fb1943add41d916b4e700360fa2c
parent866cb97668fadff50dea8d16792c3b6736d531dc (diff)
downloadlibquotient-e24ebc6dc5382ad05077575d267f66efac39e8dd.tar.gz
libquotient-e24ebc6dc5382ad05077575d267f66efac39e8dd.zip
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.
-rw-r--r--settings.h8
1 files changed, 7 insertions, 1 deletions
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 <typename... ArgTs>
- AccountSettings(const QString& accountId, ArgTs... qsettingsArgs)
+ explicit AccountSettings(const QString& accountId, ArgTs... qsettingsArgs)
: SettingsGroup("Accounts/" + accountId, qsettingsArgs...)
{ }
virtual ~AccountSettings();