summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorFawzi Mohamed <fawzi.mohamed@digia.com>2013-06-07 11:46:44 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-06-10 12:50:44 +0200
commitc558d84e79a7c7553bf182c8f298fb57826bf9af (patch)
treefffc0fb21eb52210d2496f2b0db80655f8a8f36f /tools
parentdfe77c25412eedcfecfd738904c2714c53d1e3bb (diff)
downloadqtquick1-c558d84e79a7c7553bf182c8f298fb57826bf9af.tar.gz
qmlplugindump1: make it behave more like qmplugindumpv5.1.0-rc1
* use -nonrelocatable as flag * always emit meta object revisions Change-Id: I8bab4e4faf458f403dbfdc9e6c11c0ad17c27295 Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/qmlplugindump/main.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/tools/qmlplugindump/main.cpp b/tools/qmlplugindump/main.cpp
index 8d87c750..2b2bb85a 100644
--- a/tools/qmlplugindump/main.cpp
+++ b/tools/qmlplugindump/main.cpp
@@ -314,17 +314,13 @@ public:
qSort(exportStrings);
qml->writeArrayBinding(QLatin1String("exports"), exportStrings);
- // write meta object revisions unless they're all zero
+ // write meta object revisions
QStringList metaObjectRevisions;
- bool shouldWriteMetaObjectRevisions = false;
foreach (const QString &exportString, exportStrings) {
int metaObjectRevision = exports[exportString]->metaObjectRevision();
- if (metaObjectRevision != 0)
- shouldWriteMetaObjectRevisions = true;
metaObjectRevisions += QString::number(metaObjectRevision);
}
- if (shouldWriteMetaObjectRevisions)
- qml->writeArrayBinding(QLatin1String("exportMetaObjectRevisions"), metaObjectRevisions);
+ qml->writeArrayBinding(QLatin1String("exportMetaObjectRevisions"), metaObjectRevisions);
if (const QMetaObject *attachedType = (*qmlTypes.begin())->attachedPropertiesType()) {
// Can happen when a type is registered that returns itself as attachedPropertiesType()
@@ -528,7 +524,7 @@ void sigSegvHandler(int) {
void printUsage(const QString &appName)
{
qWarning() << qPrintable(QString(
- "Usage: %1 [-v] [-notrelocatable] module.uri version [module/import/path]\n"
+ "Usage: %1 [-v] [-[non]relocatable] module.uri version [module/import/path]\n"
" %1 [-v] -path path/to/qmldir/directory [version]\n"
" %1 [-v] -builtins\n"
"Example: %1 Qt.labs.particles 1.0 /home/user/dev/qt-install/imports").arg(
@@ -579,8 +575,13 @@ int main(int argc, char *argv[])
}
if (arg == QLatin1String("--notrelocatable")
- || arg == QLatin1String("-notrelocatable")) {
+ || arg == QLatin1String("-notrelocatable")
+ || arg == QLatin1String("--nonrelocatable")
+ || arg == QLatin1String("-nonrelocatable")) {
relocatable = false;
+ } else if (arg == QLatin1String("--relocatable")
+ || arg == QLatin1String("-relocatable")) {
+ relocatable = true;
} else if (arg == QLatin1String("--path")
|| arg == QLatin1String("-path")) {
action = Path;