summaryrefslogtreecommitdiffstats
path: root/doc/src
diff options
context:
space:
mode:
authorOlivier Goffart <olivier.goffart@nokia.com>2010-08-04 16:29:09 (GMT)
committerOlivier Goffart <olivier.goffart@nokia.com>2010-08-06 09:06:17 (GMT)
commit633f3f45e5420663cf4ceadea79e62fea44cd2eb (patch)
tree1b2c0d8b5dc0746a51c2ea4bf542845273cf7006 /doc/src
parent7b5e37cab738804d47b78582aa3d0f3bb6933e70 (diff)
downloadQt-633f3f45e5420663cf4ceadea79e62fea44cd2eb.zip
Qt-633f3f45e5420663cf4ceadea79e62fea44cd2eb.tar.gz
Qt-633f3f45e5420663cf4ceadea79e62fea44cd2eb.tar.bz2
Remove the use of deprecated qVariant*
Test directory untouched. This just apply those regexp: git grep -O"sed -i 's/qVariantValue</qvariant_cast</'" qVariantValue git grep -O"sed -i 's/qVariantSetValue(\([^&*\(),]*\), */\\1.setValue(/'" qVariantSetValue git grep -O"sed -i 's/qVariantSetValue *<\([^>]*\)> *(\([^&*\(),]*\), */\\2.setValue<\\1>(/'" qVariantSetValue git grep -O"sed -i 's/qVariantCanConvert *<\([^>]*\)> *(\([^&*\(),]*\))/\\2.canConvert<\\1>()/g'" qVariantCanConvert git grep -O"sed -i 's/qVariantCanConvert *<\([^>]*\)> *(\([^&*\(),]*([^&*\(),]*)\))/\\2.canConvert<\\1>()/g'" qVariantCanConvert git grep -O"sed -i 's/qVariantFromValue\( *[(<]\)/QVariant::fromValue\\1/'" qVariantFromValue git checkout src/corelib/kernal/qvariant* Rev-by: dev mailing list
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/examples/customtype.qdoc2
-rw-r--r--doc/src/snippets/accessibilityslidersnippet.cpp2
-rw-r--r--doc/src/snippets/code/doc_src_qtscript.qdoc2
-rw-r--r--doc/src/snippets/code/src_corelib_kernel_qvariant.cpp2
-rw-r--r--doc/src/snippets/code/src_xmlpatterns_api_qxmlquery.cpp2
-rw-r--r--doc/src/xml-processing/xml-patterns.qdoc2
6 files changed, 6 insertions, 6 deletions
diff --git a/doc/src/examples/customtype.qdoc b/doc/src/examples/customtype.qdoc
index e003129..0765c5f 100644
--- a/doc/src/examples/customtype.qdoc
+++ b/doc/src/examples/customtype.qdoc
@@ -117,7 +117,7 @@
\snippet examples/tools/customtype/main.cpp storing a custom value
- Alternatively, the qVariantFromValue() and qVariantSetValue() functions
+ Alternatively, the QVariant::fromValue() and qVariantSetValue() functions
can be used if you are using a compiler without support for member template
functions.
diff --git a/doc/src/snippets/accessibilityslidersnippet.cpp b/doc/src/snippets/accessibilityslidersnippet.cpp
index 466579d..05cbe40 100644
--- a/doc/src/snippets/accessibilityslidersnippet.cpp
+++ b/doc/src/snippets/accessibilityslidersnippet.cpp
@@ -227,7 +227,7 @@ QVariant QAccessibleAbstractSlider::invokeMethodEx(Method method, int child, con
case ListSupportedMethods: {
QSet<QAccessible::Method> set;
set << ListSupportedMethods;
- return qVariantFromValue(set | qvariant_cast<QSet<QAccessible::Method> >(
+ return QVariant::fromValue(set | qvariant_cast<QSet<QAccessible::Method> >(
QAccessibleWidgetEx::invokeMethodEx(method, child, params)));
}
default:
diff --git a/doc/src/snippets/code/doc_src_qtscript.qdoc b/doc/src/snippets/code/doc_src_qtscript.qdoc
index 8effdf3..a81029e 100644
--- a/doc/src/snippets/code/doc_src_qtscript.qdoc
+++ b/doc/src/snippets/code/doc_src_qtscript.qdoc
@@ -964,7 +964,7 @@ QScriptValue constructXmlStreamReader(QScriptContext *context, QScriptEngine *en
XmlStreamReaderPointer pointer(reader);
// store the shared pointer in the script object that we are constructing
- return engine->newVariant(context->thisObject(), qVariantFromValue(pointer));
+ return engine->newVariant(context->thisObject(), QVariant::fromValue(pointer));
}
//! [93]
diff --git a/doc/src/snippets/code/src_corelib_kernel_qvariant.cpp b/doc/src/snippets/code/src_corelib_kernel_qvariant.cpp
index fd3f5d2..e81745c 100644
--- a/doc/src/snippets/code/src_corelib_kernel_qvariant.cpp
+++ b/doc/src/snippets/code/src_corelib_kernel_qvariant.cpp
@@ -132,5 +132,5 @@ return QVariant::fromValue(s);
//! [8]
QObject *object = getObjectFromSomewhere();
-QVariant data = qVariantFromValue(object);
+QVariant data = QVariant::fromValue(object);
//! [8]
diff --git a/doc/src/snippets/code/src_xmlpatterns_api_qxmlquery.cpp b/doc/src/snippets/code/src_xmlpatterns_api_qxmlquery.cpp
index 139e0a3..ef5cfb2 100644
--- a/doc/src/snippets/code/src_xmlpatterns_api_qxmlquery.cpp
+++ b/doc/src/snippets/code/src_xmlpatterns_api_qxmlquery.cpp
@@ -163,7 +163,7 @@
break;
default:
if (v.userType() == qMetaTypeId<QXmlName>()) {
- QXmlName n = qVariantValue<QXmlName>(v);
+ QXmlName n = qvariant_cast<QXmlName>(v);
// process QXmlName n...
}
else {
diff --git a/doc/src/xml-processing/xml-patterns.qdoc b/doc/src/xml-processing/xml-patterns.qdoc
index dcf92f6..3e591da 100644
--- a/doc/src/xml-processing/xml-patterns.qdoc
+++ b/doc/src/xml-processing/xml-patterns.qdoc
@@ -415,7 +415,7 @@
slight-of-hand using the \l{QMetaType} {Qt metatype system}. We
must modify our example to use a couple of template functions, a
friend of QMetaType (qMetaTypeId<T>()) and a friend of QVariant
- (qVariantValue<T>()):
+ (qvariant_cast<T>()):
\snippet doc/src/snippets/code/src_xmlpatterns_api_qxmlquery.cpp 6