summaryrefslogtreecommitdiffstats
path: root/tools/xmlpatterns/main.cpp
diff options
context:
space:
mode:
authorPaul Olav Tvete <paul.tvete@nokia.com>2010-08-19 10:04:39 (GMT)
committerPaul Olav Tvete <paul.tvete@nokia.com>2010-08-19 10:04:39 (GMT)
commita226143eeda6771efc4f0df6955351336735cb60 (patch)
treea279f87d74f5929e36fe6a3aa5e4f4d843b32458 /tools/xmlpatterns/main.cpp
parentc02ad51733d0a2885ddb39cb7e3b09355ab97213 (diff)
parentffbce9839f8be5c2f21cc66b617dbeb0a47af269 (diff)
downloadQt-a226143eeda6771efc4f0df6955351336735cb60.zip
Qt-a226143eeda6771efc4f0df6955351336735cb60.tar.gz
Qt-a226143eeda6771efc4f0df6955351336735cb60.tar.bz2
Merge remote branch 'qt/master' into lighthouse-master
Diffstat (limited to 'tools/xmlpatterns/main.cpp')
-rw-r--r--tools/xmlpatterns/main.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/tools/xmlpatterns/main.cpp b/tools/xmlpatterns/main.cpp
index b0e9e67..8479de7 100644
--- a/tools/xmlpatterns/main.cpp
+++ b/tools/xmlpatterns/main.cpp
@@ -145,14 +145,14 @@ protected:
}
/* The value.isNull() check ensures we can bind variables whose value is an empty string. */
- return qVariantFromValue(Parameter(name, value.isNull() ? QString(QLatin1String("")) : value ));
+ return QVariant::fromValue(Parameter(name, value.isNull() ? QString(QLatin1String("")) : value ));
}
else if(arg.name() == QLatin1String("output"))
{
QFile *const f = new QFile(input);
if(f->open(QIODevice::WriteOnly))
- return qVariantFromValue(static_cast<QIODevice *>(f));
+ return QVariant::fromValue(static_cast<QIODevice *>(f));
else
{
message(QXmlPatternistCLI::tr("Failed to open file %1 for writing: %2").arg(f->fileName(), f->errorString()));
@@ -168,7 +168,7 @@ protected:
return QVariant();
}
else
- return qVariantFromValue(name);
+ return QVariant::fromValue(name);
}
else
return QApplicationArgumentParser::convertToValue(arg, input);
@@ -200,7 +200,7 @@ protected:
out->open(stdout, QIODevice::WriteOnly);
#endif
- return qVariantFromValue(static_cast<QIODevice *>(out));
+ return QVariant::fromValue(static_cast<QIODevice *>(out));
}
else
return QApplicationArgumentParser::defaultValue(argument);
@@ -317,7 +317,7 @@ int main(int argc, char **argv)
QXmlQuery query(lang, namePool);
- query.setInitialTemplateName(qVariantValue<QXmlName>(parser.value(initialTemplateName)));
+ query.setInitialTemplateName(qvariant_cast<QXmlName>(parser.value(initialTemplateName)));
/* Bind external variables. */
{
@@ -329,7 +329,7 @@ int main(int argc, char **argv)
for(int i = 0; i < len; ++i)
{
- const Parameter p(qVariantValue<Parameter>(parameters.at(i)));
+ const Parameter p(qvariant_cast<Parameter>(parameters.at(i)));
if(usedParameters.contains(p.first))
{
@@ -359,7 +359,7 @@ int main(int argc, char **argv)
query.setQuery(effectiveURI);
- const QPatternist::AutoPtr<QIODevice> outDevice(qVariantValue<QIODevice *>(parser.value(output)));
+ const QPatternist::AutoPtr<QIODevice> outDevice(qvariant_cast<QIODevice *>(parser.value(output)));
Q_ASSERT(outDevice);
Q_ASSERT(outDevice->isWritable());