From 8e5e9d7987d0251fa61e24acbf6171879df3ae16 Mon Sep 17 00:00:00 2001 From: Jerome Pasion Date: Fri, 9 May 2014 14:53:06 +0200 Subject: QDoc: Added "QML Type" to HTML titles of QML type pages. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit -makes it more consistent with the C++ pages. -easier to read for the search engines. Change-Id: I172bdff04e0aa80ee58a903d112585992234d7d7 Reviewed-by: Topi Reiniƶ --- src/tools/qdoc/htmlgenerator.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/tools') diff --git a/src/tools/qdoc/htmlgenerator.cpp b/src/tools/qdoc/htmlgenerator.cpp index 641e59f018..06097e85d5 100644 --- a/src/tools/qdoc/htmlgenerator.cpp +++ b/src/tools/qdoc/htmlgenerator.cpp @@ -1446,6 +1446,10 @@ void HtmlGenerator::generateDocNode(DocNode* dn, CodeMarker* marker) // Replace the marker with a QML code marker. marker = CodeMarker::markerForLanguage(QLatin1String("QML")); } + else if (dn->subType() == Node::QmlClass) { + fullTitle = fullTitle + " QML Type"; + htmlTitle = fullTitle; + } generateHeader(htmlTitle, dn, marker); /* -- cgit v1.2.3 From 199b2594ff08b8341126165f17bbef8af54351ec Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Sun, 11 May 2014 17:41:40 -0700 Subject: Make the use of -ffunction-sections more generic in Qt Move it from bootstrap.pro into qt_module.prf so it will apply to any other bootstrapped libraries, like libQmlDevTools. Variable called "SPLIT_SECTIONS" because -fdata-sections could be added in the future, if it proves to be a benefit. Change-Id: I3fbb004f111620a84e58e9112e9bce3afd95631e Reviewed-by: Oswald Buddenhagen --- src/tools/bootstrap/bootstrap.pro | 2 -- 1 file changed, 2 deletions(-) (limited to 'src/tools') diff --git a/src/tools/bootstrap/bootstrap.pro b/src/tools/bootstrap/bootstrap.pro index fea4e2519f..310ea317ac 100644 --- a/src/tools/bootstrap/bootstrap.pro +++ b/src/tools/bootstrap/bootstrap.pro @@ -145,8 +145,6 @@ macx { ../../corelib/io/qstandardpaths_win.cpp } -*-g++*: QMAKE_CXXFLAGS += -ffunction-sections - if(contains(QT_CONFIG, zlib)|cross_compile):include(../../3rdparty/zlib.pri) else:include(../../3rdparty/zlib_dependency.pri) -- cgit v1.2.3 From 1243940f83a5c04cc0eb64a0d1679dab3b7164f1 Mon Sep 17 00:00:00 2001 From: Sze Howe Koh Date: Fri, 16 May 2014 22:46:23 +0800 Subject: QDoc: Stop copying title string unnecessarily "htmlTitle" never diverges from "fullTitle". Change-Id: Id1ce9005311bd86aa9803836168a2bebae6db65d Reviewed-by: Martin Smith Reviewed-by: Jerome Pasion --- src/tools/qdoc/htmlgenerator.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'src/tools') diff --git a/src/tools/qdoc/htmlgenerator.cpp b/src/tools/qdoc/htmlgenerator.cpp index 06097e85d5..407253ff64 100644 --- a/src/tools/qdoc/htmlgenerator.cpp +++ b/src/tools/qdoc/htmlgenerator.cpp @@ -1344,7 +1344,6 @@ void HtmlGenerator::generateCollisionPages() ncn->clearCurrentChild(); beginSubPage(ncn, Generator::fileName(ncn)); QString fullTitle = ncn->fullTitle(); - QString htmlTitle = fullTitle; CodeMarker* marker = CodeMarker::markerForFileName(ncn->location().filePath()); if (ncn->isQmlNode()) { // Replace the marker with a QML code marker. @@ -1352,7 +1351,7 @@ void HtmlGenerator::generateCollisionPages() marker = CodeMarker::markerForLanguage(QLatin1String("QML")); } - generateHeader(htmlTitle, ncn, marker); + generateHeader(fullTitle, ncn, marker); if (!fullTitle.isEmpty()) out() << "

" << protectEnc(fullTitle) << "

\n"; @@ -1437,21 +1436,18 @@ void HtmlGenerator::generateDocNode(DocNode* dn, CodeMarker* marker) QList
sections; QList
::const_iterator s; QString fullTitle = dn->fullTitle(); - QString htmlTitle = fullTitle; if (dn->subType() == Node::QmlBasicType) { fullTitle = "QML Basic Type: " + fullTitle; - htmlTitle = fullTitle; // Replace the marker with a QML code marker. marker = CodeMarker::markerForLanguage(QLatin1String("QML")); } else if (dn->subType() == Node::QmlClass) { fullTitle = fullTitle + " QML Type"; - htmlTitle = fullTitle; } - generateHeader(htmlTitle, dn, marker); + generateHeader(fullTitle, dn, marker); /* Generate the TOC for the new doc format. Don't generate a TOC for the home page. -- cgit v1.2.3 From 5283a6c87beac5a43f612786fefd6e43f2c70bf6 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Mon, 19 May 2014 16:53:34 -0700 Subject: Disable hash seeding for bootstrapped tools Any bootstrapped tool is a development tool, by definition. So the effects of seeding the hash with a random number can cause the same source input to produce different binary results, which can throw some caching tools into disarray (like the Open Build System). There should be minimal fall out from the reduced protection against DoS. Since those are only development tools, "specially crafted" input implies the developer is DoS'ing him/herself. Note: the change to qhash.cpp applies to moc and rcc, which are always bootstrapped. Change-Id: I061ab52036e40627c0703f1bf881455cbf848f43 Reviewed-by: Oswald Buddenhagen Reviewed-by: hjk --- src/tools/qdoc/main.cpp | 2 ++ src/tools/uic/main.cpp | 3 +++ 2 files changed, 5 insertions(+) (limited to 'src/tools') diff --git a/src/tools/qdoc/main.cpp b/src/tools/qdoc/main.cpp index 398d188464..3d2ee409b0 100644 --- a/src/tools/qdoc/main.cpp +++ b/src/tools/qdoc/main.cpp @@ -542,6 +542,7 @@ static void processQdocconfFile(const QString &fileName) Generator::debugSegfault("qdoc finished!"); } +extern Q_CORE_EXPORT QBasicAtomicInt qt_qhash_seed; QT_END_NAMESPACE int main(int argc, char **argv) @@ -549,6 +550,7 @@ int main(int argc, char **argv) QT_USE_NAMESPACE #ifndef QT_BOOTSTRAPPED + qt_qhash_seed.testAndSetRelaxed(-1, 0); // set the hash seed to 0 if it wasn't set yet QCoreApplication app(argc, argv); #endif diff --git a/src/tools/uic/main.cpp b/src/tools/uic/main.cpp index cb2bd430ff..12b0ee6737 100644 --- a/src/tools/uic/main.cpp +++ b/src/tools/uic/main.cpp @@ -52,9 +52,12 @@ #include QT_BEGIN_NAMESPACE +extern Q_CORE_EXPORT QBasicAtomicInt qt_qhash_seed; int runUic(int argc, char *argv[]) { + qt_qhash_seed.testAndSetRelaxed(-1, 0); // set the hash seed to 0 if it wasn't set yet + QCoreApplication app(argc, argv); QCoreApplication::setApplicationVersion(QString::fromLatin1(QT_VERSION_STR)); -- cgit v1.2.3