From 01f90a972330f60877e27f00008ee7991ad5b751 Mon Sep 17 00:00:00 2001 From: ck Date: Wed, 28 Jul 2010 11:53:12 +0200 Subject: [PATCH 1/6] Maemo: Don't use dpkg-buildpackage. Reverts the core changes of 5b47f47dc9d944da973d747a56dd327d893ea212, which was a horrible mistake and could not possibly have worked with this branch. --- .../qt-maemo/maemopackagecreationstep.cpp | 57 +++++++++++-------- 1 file changed, 33 insertions(+), 24 deletions(-) diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemopackagecreationstep.cpp b/src/plugins/qt4projectmanager/qt-maemo/maemopackagecreationstep.cpp index a4456c3e2b8..aab42f7c2fa 100644 --- a/src/plugins/qt4projectmanager/qt-maemo/maemopackagecreationstep.cpp +++ b/src/plugins/qt4projectmanager/qt-maemo/maemopackagecreationstep.cpp @@ -195,10 +195,6 @@ bool MaemoPackageCreationStep::createPackage() QByteArray rulesContents = rulesFile.readAll(); rulesContents.replace("DESTDIR", "INSTALL_ROOT"); - // Would be the right solution, but does not work (on Windows), - // because dpkg-genchanges doesn't know about it (and can't be told). - // rulesContents.replace("dh_builddeb", "dh_builddeb --destdir=."); - rulesFile.resize(0); rulesFile.write(rulesContents); if (rulesFile.error() != QFile::NoError) { @@ -220,30 +216,43 @@ bool MaemoPackageCreationStep::createPackage() } } - if (!runCommand(QLatin1String("dpkg-buildpackage -nc -uc -us"))) + if (!runCommand(QLatin1String("dh_installdirs"))) return false; - // Workaround for non-working dh_builddeb --destdir=. - if (!QDir(buildDir).isRoot()) { - const QString packageFileName = QFileInfo(packageFilePath()).fileName(); - const QString changesFileName = QFileInfo(packageFileName) - .completeBaseName() + QLatin1String(".changes"); - const QString packageSourceDir = buildDir + QLatin1String("/../"); - const QString packageSourceFilePath - = packageSourceDir + packageFileName; - const QString changesSourceFilePath - = packageSourceDir + changesFileName; - const QString changesTargetFilePath - = buildDir + QLatin1Char('/') + changesFileName; - QFile::remove(packageFilePath()); - QFile::remove(changesTargetFilePath); - if (!QFile::rename(packageSourceFilePath, packageFilePath()) - || !QFile::rename(changesSourceFilePath, changesTargetFilePath)) { - raiseError(tr("Packaging failed."), - tr("Could not move package files from %1 to %2.") - .arg(packageSourceDir, buildDir)); + const QDir debianRoot = QDir(buildDir % QLatin1String("/debian/") + % executableFileName().toLower()); + for (int i = 0; i < m_packageContents->rowCount(); ++i) { + const MaemoDeployable &d = m_packageContents->deployableAt(i); + const QString targetFile = debianRoot.path() + '/' + d.remoteFilePath; + const QString absTargetDir = QFileInfo(targetFile).dir().path(); + const QString relTargetDir = debianRoot.relativeFilePath(absTargetDir); + if (!debianRoot.exists(relTargetDir) + && !debianRoot.mkpath(relTargetDir)) { + raiseError(tr("Packaging Error: Could not create directory '%1'.") + .arg(QDir::toNativeSeparators(absTargetDir))); return false; } + if (QFile::exists(targetFile) && !QFile::remove(targetFile)) { + raiseError(tr("Packaging Error: Could not replace file '%1'.") + .arg(QDir::toNativeSeparators(targetFile))); + return false; + } + + if (!QFile::copy(d.localFilePath, targetFile)) { + raiseError(tr("Packaging Error: Could not copy '%1' to '%2'.") + .arg(QDir::toNativeSeparators(d.localFilePath)) + .arg(QDir::toNativeSeparators(targetFile))); + return false; + } + } + + const QStringList commands = QStringList() << QLatin1String("dh_link") + << QLatin1String("dh_fixperms") << QLatin1String("dh_installdeb") + << QLatin1String("dh_gencontrol") << QLatin1String("dh_md5sums") + << QLatin1String("dh_builddeb --destdir=."); + foreach (const QString &command, commands) { + if (!runCommand(command)) + return false; } emit addOutput(tr("Package created."), textCharFormat); From 14686acb54f1ee44ec946d728c7729ba068b4bd7 Mon Sep 17 00:00:00 2001 From: Christian Kamm Date: Wed, 28 Jul 2010 13:20:56 +0200 Subject: [PATCH 2/6] QmlJS: Update builtin type information. For Qt 4.7 rev 953e91c582cd396082250748e4c4d8424292c1de --- .../qml-builtin-types.xml | 189 ++++++++++++------ 1 file changed, 131 insertions(+), 58 deletions(-) diff --git a/share/qtcreator/qml-type-descriptions/qml-builtin-types.xml b/share/qtcreator/qml-type-descriptions/qml-builtin-types.xml index 3f917c54797..d6e54698735 100644 --- a/share/qtcreator/qml-type-descriptions/qml-builtin-types.xml +++ b/share/qtcreator/qml-type-descriptions/qml-builtin-types.xml @@ -277,7 +277,7 @@ - + @@ -976,6 +976,8 @@ + + @@ -1110,8 +1112,11 @@ - - + + + + + @@ -1376,6 +1381,7 @@ + @@ -1452,6 +1458,13 @@ + + + + + + + @@ -1582,6 +1595,7 @@ + @@ -1589,6 +1603,7 @@ + @@ -1659,9 +1674,9 @@ + - @@ -1671,7 +1686,6 @@ - @@ -1698,7 +1712,6 @@ - @@ -1832,6 +1845,8 @@ + + @@ -1848,6 +1863,8 @@ + + @@ -1870,11 +1887,9 @@ - - @@ -1912,11 +1927,11 @@ - + + - @@ -1929,7 +1944,7 @@ - + @@ -1954,7 +1969,11 @@ - + + + + + @@ -2529,36 +2548,19 @@ - - - - - - - - - - - - - - - - - - - + + - - - - + + + + @@ -2730,8 +2732,7 @@ - - + @@ -2774,8 +2775,8 @@ - - + + @@ -2786,12 +2787,27 @@ - - - + + + + + + + + + + + + + + + + + + @@ -2814,7 +2830,7 @@ - + @@ -2825,8 +2841,7 @@ - - + @@ -2871,11 +2886,9 @@ - - - - - + + + @@ -2883,13 +2896,21 @@ - - - - + + + + + + + + + + + + @@ -3035,8 +3056,62 @@ + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -3092,7 +3167,7 @@ - + @@ -3101,7 +3176,6 @@ - @@ -3135,7 +3209,6 @@ - From 34f241c051d796600807c5ea473d943ddb2bb99a Mon Sep 17 00:00:00 2001 From: Robert Loehning Date: Wed, 28 Jul 2010 11:56:47 +0100 Subject: [PATCH 3/6] Working around bug in Qt to show tooltips correctly. Task-number: QTBUG-12057 Reviewed-by: Alessandro Portale --- src/plugins/debugger/stackhandler.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/plugins/debugger/stackhandler.cpp b/src/plugins/debugger/stackhandler.cpp index 5913d0c30d3..e8a4959ebcf 100644 --- a/src/plugins/debugger/stackhandler.cpp +++ b/src/plugins/debugger/stackhandler.cpp @@ -39,6 +39,9 @@ #include #include +#include +#include + namespace Debugger { namespace Internal { @@ -76,12 +79,14 @@ QString StackFrame::toString() const QString StackFrame::toToolTip() const { + const QString filePath = QDir::toNativeSeparators(file); QString res; QTextStream str(&res); str << "" << "" << "" - << "" + << "" << "" << "" << "" From 24a736b602878c9f89b5d1a7cf0fda278f8f1da5 Mon Sep 17 00:00:00 2001 From: Christian Kamm Date: Tue, 1 Jun 2010 12:03:17 +0200 Subject: [PATCH 4/6] QmlJS: Make the qmldump tool treat extended types correctly. (cherry picked from commit 619d50f080793e1eae789642c3cce449669dc41e) --- src/tools/qml/qmldump/main.cpp | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/src/tools/qml/qmldump/main.cpp b/src/tools/qml/qmldump/main.cpp index adf3bf53953..525ccd83354 100644 --- a/src/tools/qml/qmldump/main.cpp +++ b/src/tools/qml/qmldump/main.cpp @@ -275,17 +275,35 @@ int main(int argc, char *argv[]) metas.insert(FriendlyQObject::qtMeta()); - // ### TODO: We don't treat extended types correctly. Currently only hits the - // QDeclarativeGraphicsWidget extension to QGraphicsWidget + QMultiHash extensions; foreach (const QDeclarativeType *ty, QDeclarativeMetaType::qmlTypes()) { - if (ty->isExtendedType()) - continue; - - cppToQml.insert(ty->metaObject()->className(), ty->qmlTypeName()); qmlTypeByCppName.insert(ty->metaObject()->className(), ty); + if (ty->isExtendedType()) { + extensions.insert(ty->typeName(), ty->metaObject()->className()); + } else { + cppToQml.insert(ty->metaObject()->className(), ty->qmlTypeName()); + } processDeclarativeType(ty, &metas); } + // Adjust qml names of extended objects. + // The chain ends up being: + // __extended__.originalname - the base object + // __extension_0_.originalname - first extension + // .. + // __extension_n-2_.originalname - second to last extension + // originalname - last extension + foreach (const QByteArray &extendedCpp, extensions.keys()) { + const QByteArray extendedQml = cppToQml.value(extendedCpp); + cppToQml.insert(extendedCpp, "__extended__." + extendedQml); + QList extensionCppNames = extensions.values(extendedCpp); + for (int i = 0; i < extensionCppNames.size() - 1; ++i) { + QByteArray adjustedName = QString("__extension__%1.%2").arg(QString::number(i), QString(extendedQml)).toAscii(); + cppToQml.insert(extensionCppNames.value(i), adjustedName); + } + cppToQml.insert(extensionCppNames.last(), extendedQml); + } + foreach (const QDeclarativeType *ty, QDeclarativeMetaType::qmlTypes()) { if (ty->isExtendedType()) continue; From 033def369cb0bda5ce134b7dabe97465596ed3e1 Mon Sep 17 00:00:00 2001 From: Christian Kamm Date: Wed, 9 Jun 2010 14:24:23 +0200 Subject: [PATCH 5/6] QmlJS: Make qmldump not dump open/dynamic meta objects. They would need special treatment, like the Qml extended objects. The issue is they lead to two meta objects with the same classname and the dumper can't handle that. (cherry picked from commit 206c190e7ff3e7dfd59341fa99207c0d1bff0dd7) --- src/tools/qml/qmldump/main.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/tools/qml/qmldump/main.cpp b/src/tools/qml/qmldump/main.cpp index 525ccd83354..4dcdb0156c2 100644 --- a/src/tools/qml/qmldump/main.cpp +++ b/src/tools/qml/qmldump/main.cpp @@ -9,7 +9,10 @@ #include #include #include +#include +#include #include +#include #include static QHash qmlTypeByCppName; @@ -46,7 +49,11 @@ void processMetaObject(const QMetaObject *meta, QSet *metas if (! meta || metas->contains(meta)) return; - metas->insert(meta); + // dynamic meta objects break things badly + const QMetaObjectPrivate *mop = reinterpret_cast(meta->d.data); + if (!(mop->flags & DynamicMetaObject)) + metas->insert(meta); + processMetaObject(meta->superClass(), metas); } From df87d970bc9ada725a4f7e03dd7c9065cdb1fd35 Mon Sep 17 00:00:00 2001 From: Christian Kamm Date: Wed, 28 Jul 2010 13:51:47 +0200 Subject: [PATCH 6/6] QmlJS: Update builtin type information. Fix for 14686acb54f1ee44ec946d728c7729ba068b4bd7 with corrected qmldump. --- .../qml-builtin-types.xml | 56 +++++++++---------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/share/qtcreator/qml-type-descriptions/qml-builtin-types.xml b/share/qtcreator/qml-type-descriptions/qml-builtin-types.xml index d6e54698735..bba94ab56f5 100644 --- a/share/qtcreator/qml-type-descriptions/qml-builtin-types.xml +++ b/share/qtcreator/qml-type-descriptions/qml-builtin-types.xml @@ -217,15 +217,6 @@ - - - - - - - - - @@ -277,7 +268,7 @@ - + @@ -2455,24 +2446,14 @@ - - - - - - - - - - - - - - - - - - + + + + + + + + @@ -3240,6 +3221,25 @@ + + + + + + + + + + + + + + + + + + +
" << StackHandler::tr("Address:") << "" << address << "
" << StackHandler::tr("Function:") << "" << function << "
" << StackHandler::tr("File:") << "" << QDir::toNativeSeparators(file) << "
" << StackHandler::tr("File:") << "" << filePath << "
" << StackHandler::tr("Line:") << "" << line << "
" << StackHandler::tr("From:") << "" << from << "
" << StackHandler::tr("To:") << "" << to << "