summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@nokia.com>2012-01-09 12:24:44 +0100
committerLars Knoll <lars.knoll@nokia.com>2012-01-09 13:33:44 +0100
commitf75b851a59115fb84ffc0680816cb900c3c2bd55 (patch)
tree4b5ed9c049ae37c5874b22bde387ea7f41356234 /src
parentbbf09d4de0413ab5ea173639511c95da00aca2ab (diff)
Fixed the remaining API issues in QJsonValue
Removed all setFoo() methods and made detach() private. Change-Id: Ie84dc0a46bf19153745b5412feaf00b8957a7a8f Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
Diffstat (limited to 'src')
-rw-r--r--src/qjsonvalue.cpp35
-rw-r--r--src/qjsonvalue.h14
2 files changed, 2 insertions, 47 deletions
diff --git a/src/qjsonvalue.cpp b/src/qjsonvalue.cpp
index 25dfebf..5f598d7 100644
--- a/src/qjsonvalue.cpp
+++ b/src/qjsonvalue.cpp
@@ -241,41 +241,6 @@ QVariant QJsonValue::toVariant() const
QJsonValue::Type QJsonValue::type() const
{
return t;
- }
-
-void QJsonValue::setValue(bool b)
-{
- *this = QJsonValue(b);
-}
-
-void QJsonValue::setValue(double d)
-{
- *this = QJsonValue(d);
-}
-
-void QJsonValue::setValue(int i)
-{
- *this = QJsonValue(i);
-}
-
-void QJsonValue::setValue(const QString &s)
-{
- *this = QJsonValue(s);
-}
-
-void QJsonValue::setValue(const QLatin1String &s)
-{
- *this = QJsonValue(s);
-}
-
-void QJsonValue::setValue(const QJsonArray &a)
-{
- *this = QJsonValue(a);
-}
-
-void QJsonValue::setValue(const QJsonObject &o)
-{
- *this = QJsonValue(o);
}
bool QJsonValue::toBool() const
diff --git a/src/qjsonvalue.h b/src/qjsonvalue.h
index 6b677b4..38335fc 100644
--- a/src/qjsonvalue.h
+++ b/src/qjsonvalue.h
@@ -86,15 +86,6 @@ public:
inline bool isObject() const { return type() == Object; }
inline bool isUndefined() const { return type() == Undefined; }
- // ### remove!
- void setValue(bool);
- void setValue(double);
- void setValue(int);
- void setValue(const QString &);
- void setValue(const QLatin1String &);
- void setValue(const QJsonArray &);
- void setValue(const QJsonObject &);
-
bool toBool() const;
double toNumber() const;
int toInt() const;
@@ -105,9 +96,6 @@ public:
bool operator==(const QJsonValue &other) const;
bool operator!=(const QJsonValue &other) const;
- // ### make private
- void detach();
-
private:
// avoid implicit conversions from char * to bool
inline QJsonValue(const void *) {}
@@ -117,6 +105,8 @@ private:
friend class QJsonObject;
QJsonValue(Private::Data *d, Private::Base *b, const Private::Value& v);
+ void detach();
+
// ### These should move to Private::Value
int requiredStorage(bool *compressed) const;
uint valueToStore(uint offset) const;