diff options
author | Martin Smith <msmith@trolltech.com> | 2010-05-07 11:47:13 (GMT) |
---|---|---|
committer | Martin Smith <msmith@trolltech.com> | 2010-05-07 11:47:13 (GMT) |
commit | 2c6ebec2b7fd49c4382b3d3d4977261ad89071c9 (patch) | |
tree | d7d9536366ef6791f467a0a30650a67493e40546 | |
parent | 137e196dc1ae2364265e7c1eb79c880120a79bb9 (diff) | |
parent | 8835bd7a0d46bff4d5a2fa02402ca9df6a2776d9 (diff) | |
download | Qt-2c6ebec2b7fd49c4382b3d3d4977261ad89071c9.zip Qt-2c6ebec2b7fd49c4382b3d3d4977261ad89071c9.tar.gz Qt-2c6ebec2b7fd49c4382b3d3d4977261ad89071c9.tar.bz2 |
Merge branch '4.7' of git@scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.7
-rw-r--r-- | dist/changes-4.7.0 | 16 | ||||
-rwxr-xr-x | doc/src/template/scripts/functions.js | 7 | ||||
-rwxr-xr-x | doc/src/template/style/style.css | 29 | ||||
-rw-r--r-- | src/corelib/io/qurl.cpp | 8 | ||||
-rw-r--r-- | src/declarative/qml/qdeclarativecompositetypemanager.cpp | 39 | ||||
-rw-r--r-- | src/declarative/qml/qdeclarativeengine.cpp | 2 | ||||
-rw-r--r-- | tests/auto/qxmlquery/tst_qxmlquery.cpp | 18 | ||||
-rw-r--r-- | tools/qdoc3/htmlgenerator.cpp | 60 |
8 files changed, 134 insertions, 45 deletions
diff --git a/dist/changes-4.7.0 b/dist/changes-4.7.0 index df782c0..3766c88 100644 --- a/dist/changes-4.7.0 +++ b/dist/changes-4.7.0 @@ -72,6 +72,8 @@ QtGui * Fixed a bug that led to missing text pixels in QTabBar when using small font sizes. (QTBUG-7137) + - QImage + * Added QImage::bitPlaneCount(). (QTBUG-7982) QtNetwork --------- @@ -102,6 +104,20 @@ QtXmlPatterns - [QTBUG-8394] include/import/redefine schemas only once - QXmlSchema: fix crash with referencing elements +Qt Plugins +---------- + + - Jpeg image IO plugin + * Fixed failure to store certain QImage formats as jpeg (QTBUG-7780) + * Optimized smoothscaling + * Optimized to avoid data copy when reading from memory device (QTBUG-9095) + + - SVG image IO plugin + * Added support for svgz format (QTBUG-8227) + * Fixed canRead() so that it can be used also for non-sequential + devices. (QTBUG-9053) + * Added support for clipping and scaling and backgroundcolor + * Optimized to avoid data copy when reading from memory device (QTBUG-9095) **************************************************************************** * Database Drivers * diff --git a/doc/src/template/scripts/functions.js b/doc/src/template/scripts/functions.js index 4b3107f..306b628 100755 --- a/doc/src/template/scripts/functions.js +++ b/doc/src/template/scripts/functions.js @@ -83,9 +83,9 @@ function processNokiaData(response){ } } - if(lookupCount == 0){$('#ul001').prepend('<li>no result</li>');$('#ul001 li').css('display','block');} - if(articleCount == 0){$('#ul002').prepend('<li>no result</li>');$('#ul002 li').css('display','block');} - if(exampleCount == 0){$('#ul003').prepend('<li>no result</li>');$('#ul003 li').css('display','block');} + if(lookupCount == 0){$('#ul001').prepend('<li class=\"liveResult noMatch\">Found no result</li>');$('#ul001 li').css('display','block');} + if(articleCount == 0){$('#ul002').prepend('<li class=\"liveResult noMatch\">Found no result</li>');$('#ul002 li').css('display','block');} + if(exampleCount == 0){$('#ul003').prepend('<li class=\"liveResult noMatch\">Found no result</li>');$('#ul003 li').css('display','block');} // reset count variables; lookupCount=0; articleCount = 0; @@ -97,6 +97,7 @@ function processNokiaData(response){ var blankRE=/^\s*$/; function CheckEmptyAndLoadList() { + $('.liveResult').remove(); var value = document.getElementById('pageType').value; if((blankRE.test(value)) || (value.length < 3)) { diff --git a/doc/src/template/style/style.css b/doc/src/template/style/style.css index 6bcb0db..644e56b 100755 --- a/doc/src/template/style/style.css +++ b/doc/src/template/style/style.css @@ -460,12 +460,12 @@ padding-left: 12px; background: url(../images/bullet_sq.png) no-repeat 0 5px; font: normal 400 10pt/1 Verdana; - color: #44a51c; + /* color: #44a51c;*/ margin-bottom: 10px; } .content li:hover { - text-decoration: underline; + /* text-decoration: underline;*/ } .offline .wrap .content @@ -747,11 +747,23 @@ th { padding: 5px 15px 5px 15px; + background-color: #E1E1E1; + border-bottom: 1px solid #E6E6E6; + border-left: 1px solid #E6E6E6; + border-right: 1px solid #E6E6E6; } td { padding: 3px 15px 3px 20px; + border-left: 1px solid #E6E6E6; + border-right: 1px solid #E6E6E6; + } + tr.odd td:hover, tr.even td:hover + { + /* border-right: 1px solid #C3C3C3; + border-left: 1px solid #C3C3C3;*/ } + td.rightAlign { padding: 3px 15px 3px 10px; @@ -879,13 +891,22 @@ font: 600 12px/1.2 Arial; } - .generic{} + .generic{ + max-width:100%; + } + .generic td{ + padding:0; + } + .alignedsummary{} .propsummary{} .memItemLeft{} .memItemRight{} .bottomAlign{} - .highlightedCode{} + .highlightedCode + { + margin:10px; + } .LegaleseLeft{} .valuelist{} .annotated{} diff --git a/src/corelib/io/qurl.cpp b/src/corelib/io/qurl.cpp index 7b5bfed..d6ded9d 100644 --- a/src/corelib/io/qurl.cpp +++ b/src/corelib/io/qurl.cpp @@ -5557,6 +5557,12 @@ QUrl QUrl::resolved(const QUrl &relative) const removeDotsFromPath(&t.d->encodedPath); t.d->path.clear(); +#if defined(QURL_DEBUG) + qDebug("QUrl(\"%s\").resolved(\"%s\") = \"%s\"", + toEncoded().constData(), + relative.toEncoded().constData(), + t.toEncoded().constData()); +#endif return t; } @@ -5985,7 +5991,7 @@ QUrl QUrl::fromLocalFile(const QString &localFile) { QUrl url; url.setScheme(QLatin1String("file")); - QString deslashified = QDir::toNativeSeparators(localFile); + QString deslashified = QDir::fromNativeSeparators(localFile); // magic for drives on windows if (deslashified.length() > 1 && deslashified.at(1) == QLatin1Char(':') && deslashified.at(0) != QLatin1Char('/')) { diff --git a/src/declarative/qml/qdeclarativecompositetypemanager.cpp b/src/declarative/qml/qdeclarativecompositetypemanager.cpp index 0eb7e1b..625356c 100644 --- a/src/declarative/qml/qdeclarativecompositetypemanager.cpp +++ b/src/declarative/qml/qdeclarativecompositetypemanager.cpp @@ -338,7 +338,7 @@ void QDeclarativeCompositeTypeManager::resourceReplyFinished() // WARNING, there is a copy of this function in qdeclarativeengine.cpp static QString toLocalFileOrQrc(const QUrl& url) { - if (url.scheme() == QLatin1String("qrc")) { + if (url.scheme().compare(QLatin1String("qrc"), Qt::CaseInsensitive) == 0) { if (url.authority().isEmpty()) return QLatin1Char(':') + url.path(); return QString(); @@ -360,7 +360,10 @@ void QDeclarativeCompositeTypeManager::loadResource(QDeclarativeCompositeTypeRes } else { resource->status = QDeclarativeCompositeTypeResource::Error; } + } else if (url.scheme().isEmpty()) { + // We can't open this, so just declare as an error + resource->status = QDeclarativeCompositeTypeResource::Error; } else { QNetworkReply *reply = @@ -382,27 +385,29 @@ void QDeclarativeCompositeTypeManager::loadSource(QDeclarativeCompositeTypeData if (file.open(QFile::ReadOnly)) { QByteArray data = file.readAll(); setData(unit, data, url); - } else { - QString errorDescription; - // ### - Fill in error - errorDescription = QLatin1String("File error for URL ") + url.toString(); - unit->status = QDeclarativeCompositeTypeData::Error; - // ### FIXME - QDeclarativeError error; - error.setDescription(errorDescription); - unit->errorType = QDeclarativeCompositeTypeData::AccessError; - unit->errors << error; - doComplete(unit); + return; // success } - - } else { + } else if (!url.scheme().isEmpty()) { QNetworkReply *reply = engine->networkAccessManager()->get(QNetworkRequest(url)); QObject::connect(reply, SIGNAL(finished()), this, SLOT(replyFinished())); QObject::connect(reply, SIGNAL(downloadProgress(qint64,qint64)), this, SLOT(requestProgress(qint64,qint64))); + return; // waiting } + + // error happened + QString errorDescription; + // ### - Fill in error + errorDescription = QLatin1String("File error for URL ") + url.toString(); + unit->status = QDeclarativeCompositeTypeData::Error; + // ### FIXME + QDeclarativeError error; + error.setDescription(errorDescription); + unit->errorType = QDeclarativeCompositeTypeData::AccessError; + unit->errors << error; + doComplete(unit); } void QDeclarativeCompositeTypeManager::requestProgress(qint64 received, qint64 total) @@ -724,8 +729,10 @@ void QDeclarativeCompositeTypeManager::compile(QDeclarativeCompositeTypeData *un } } - QUrl importUrl = unit->imports.baseUrl().resolved(QUrl(QLatin1String("qmldir"))); - if (toLocalFileOrQrc(importUrl).isEmpty()) + QUrl importUrl; + if (!unit->imports.baseUrl().scheme().isEmpty()) + importUrl = unit->imports.baseUrl().resolved(QUrl(QLatin1String("qmldir"))); + if (!importUrl.scheme().isEmpty() && toLocalFileOrQrc(importUrl).isEmpty()) resourceList.prepend(importUrl); for (int ii = 0; ii < resourceList.count(); ++ii) { diff --git a/src/declarative/qml/qdeclarativeengine.cpp b/src/declarative/qml/qdeclarativeengine.cpp index 0ee6dfe..1387432 100644 --- a/src/declarative/qml/qdeclarativeengine.cpp +++ b/src/declarative/qml/qdeclarativeengine.cpp @@ -1526,7 +1526,7 @@ QVariant QDeclarativeEnginePrivate::scriptValueToVariant(const QScriptValue &val // WARNING, there is a copy of this function in qdeclarativecompositetypemanager.cpp static QString toLocalFileOrQrc(const QUrl& url) { - if (url.scheme() == QLatin1String("qrc")) { + if (url.scheme().compare(QLatin1String("qrc"), Qt::CaseInsensitive) == 0) { if (url.authority().isEmpty()) return QLatin1Char(':') + url.path(); return QString(); diff --git a/tests/auto/qxmlquery/tst_qxmlquery.cpp b/tests/auto/qxmlquery/tst_qxmlquery.cpp index be0d708..6fd9b93 100644 --- a/tests/auto/qxmlquery/tst_qxmlquery.cpp +++ b/tests/auto/qxmlquery/tst_qxmlquery.cpp @@ -857,7 +857,7 @@ void tst_QXmlQuery::bindVariableXSLTSuccess() const stylesheet.bindVariable(QLatin1String("paramSelectWithTypeIntBoundWithBindVariableRequired"), QVariant(QLatin1String("param5"))); - stylesheet.setQuery(QUrl(inputFile(QLatin1String(SRCDIR "../xmlpatterns/stylesheets/parameters.xsl")))); + stylesheet.setQuery(QUrl(inputFileAsURI(QLatin1String(SRCDIR "../xmlpatterns/stylesheets/parameters.xsl")))); QVERIFY(stylesheet.isValid()); @@ -1798,11 +1798,11 @@ void tst_QXmlQuery::setFocusQUrl() const { QXmlQuery query(QXmlQuery::XSLT20); - const TestURIResolver resolver(QUrl(inputFile(QLatin1String(SRCDIR "../xmlpatterns/stylesheets/documentElement.xml")))); + const TestURIResolver resolver(QUrl(inputFileAsURI(QLatin1String(SRCDIR "../xmlpatterns/stylesheets/documentElement.xml")))); query.setUriResolver(&resolver); QVERIFY(query.setFocus(QUrl(QLatin1String("arbitraryURI")))); - query.setQuery(QUrl(inputFile(QLatin1String(SRCDIR "../xmlpatterns/stylesheets/copyWholeDocument.xsl")))); + query.setQuery(QUrl(inputFileAsURI(QLatin1String(SRCDIR "../xmlpatterns/stylesheets/copyWholeDocument.xsl")))); QVERIFY(query.isValid()); QBuffer result; @@ -2997,7 +2997,7 @@ void tst_QXmlQuery::setInitialTemplateNameQXmlName() const QCOMPARE(query.initialTemplateName(), name); - query.setQuery(QUrl(inputFile(QLatin1String(SRCDIR "../xmlpatterns/stylesheets/namedTemplate.xsl")))); + query.setQuery(QUrl(inputFileAsURI(QLatin1String(SRCDIR "../xmlpatterns/stylesheets/namedTemplate.xsl")))); QVERIFY(query.isValid()); QBuffer result; @@ -3059,7 +3059,7 @@ void tst_QXmlQuery::setNetworkAccessManager() const /* Ensure fn:doc() picks up the right QNetworkAccessManager. */ { NetworkOverrider networkOverrider(QUrl(QLatin1String("tag:example.com:DOESNOTEXIST")), - QUrl(inputFile(QLatin1String(SRCDIR "../xmlpatterns/queries/simpleDocument.xml")))); + QUrl(inputFileAsURI(QLatin1String(SRCDIR "../xmlpatterns/queries/simpleDocument.xml")))); QXmlQuery query; query.setNetworkAccessManager(&networkOverrider); @@ -3075,7 +3075,7 @@ void tst_QXmlQuery::setNetworkAccessManager() const /* Ensure setQuery() is using the right network manager. */ { NetworkOverrider networkOverrider(QUrl(QLatin1String("tag:example.com:DOESNOTEXIST")), - QUrl(inputFile(QLatin1String(SRCDIR "../xmlpatterns/queries/concat.xq")))); + QUrl(inputFileAsURI(QLatin1String(SRCDIR "../xmlpatterns/queries/concat.xq")))); QXmlQuery query; query.setNetworkAccessManager(&networkOverrider); @@ -3135,7 +3135,7 @@ void tst_QXmlQuery::multipleDocsAndFocus() const query.setQuery(QLatin1String("string(doc('") + inputFile(QLatin1String(SRCDIR "../xmlpatterns/queries/simpleDocument.xml")) + QLatin1String("'))")); - query.setFocus(QUrl(inputFile(QLatin1String(SRCDIR "../xmlpatterns/stylesheets/documentElement.xml")))); + query.setFocus(QUrl(inputFileAsURI(QLatin1String(SRCDIR "../xmlpatterns/stylesheets/documentElement.xml")))); query.setQuery(QLatin1String("string(.)")); QStringList result; @@ -3159,11 +3159,11 @@ void tst_QXmlQuery::multipleEvaluationsWithDifferentFocus() const QXmlQuery query; QStringList result; - query.setFocus(QUrl(inputFile(QLatin1String(SRCDIR "../xmlpatterns/stylesheets/documentElement.xml")))); + query.setFocus(QUrl(inputFileAsURI(QLatin1String(SRCDIR "../xmlpatterns/stylesheets/documentElement.xml")))); query.setQuery(QLatin1String("string(.)")); QVERIFY(query.evaluateTo(&result)); - query.setFocus(QUrl(inputFile(QLatin1String(SRCDIR "../xmlpatterns/stylesheets/documentElement.xml")))); + query.setFocus(QUrl(inputFileAsURI(QLatin1String(SRCDIR "../xmlpatterns/stylesheets/documentElement.xml")))); QVERIFY(query.evaluateTo(&result)); } diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp index 93b0218..6560b68 100644 --- a/tools/qdoc3/htmlgenerator.cpp +++ b/tools/qdoc3/htmlgenerator.cpp @@ -912,8 +912,14 @@ int HtmlGenerator::generateAtom(const Atom *atom, else if (atom->string() == ATOM_LIST_VALUE) { threeColumnEnumValueTable = isThreeColumnEnumValueTable(atom); if (threeColumnEnumValueTable) { - out() << "<table class=\"valuelist\">" - << "<tr><th>Constant</th>" + out() << "<table class=\"valuelist\">"; + // << "<tr>" + if (++numTableRows % 2 == 1) + out() << "<tr class=\"odd\">"; + else + out() << "<tr class=\"even\">"; + + out() << "<tr><th>Constant</th>" << "<th>Value</th>" << "<th>Description</th></tr>\n"; } @@ -1093,7 +1099,7 @@ int HtmlGenerator::generateAtom(const Atom *atom, } if (!atom->string().isEmpty()) { if (atom->string().contains("%")) - out() << "<table class=\"generic\" width=\"" << atom->string() << "\">\n "; + out() << "<table class=\"generic\">\n "; // width=\"" << atom->string() << "\">\n "; else { out() << "<table class=\"generic\">\n"; } @@ -2456,7 +2462,13 @@ void HtmlGenerator::generateCompactList(const Node *relative, out() << "<table class=\"generic\">\n"; for (k = 0; k < numRows; k++) { - out() << "<tr>\n"; + if (++numTableRows % 2 == 1) + out() << "<tr class=\"odd topAlign\">"; + else + out() << "<tr class=\"even topAlign\">"; + //break; + +// out() << "<tr>\n"; for (i = 0; i < NumColumns; i++) { if (currentOffset[i] >= firstOffset[i + 1]) { // this column is finished @@ -3159,8 +3171,13 @@ void HtmlGenerator::generateSectionList(const Section& section, twoColumn = (section.members.count() >= 5); } if (twoColumn) - out() << "<table class=\"generic\">\n" - << "<tr><td class=\"topAlign\">"; + out() << "<table class=\"generic\">\n"; + if (++numTableRows % 2 == 1) + out() << "<tr class=\"odd topAlign\">"; + else + out() << "<tr class=\"even topAlign\">"; + +// << "<tr><td class=\"topAlign\">"; out() << "<ul>\n"; int i = 0; @@ -4367,8 +4384,12 @@ void HtmlGenerator::generateQmlSummary(const Section& section, twoColumn = (count >= 5); } if (twoColumn) - out() << "<table class=\"qmlsummary\">\n" - << "<tr><td class=\"topAlign\">"; + out() << "<table class=\"qmlsummary\">\n"; + if (++numTableRows % 2 == 1) + out() << "<tr class=\"odd topAlign\">"; + else + out() << "<tr class=\"even topAlign\">"; + // << "<tr><td class=\"topAlign\">"; out() << "<ul>\n"; int row = 0; @@ -4410,7 +4431,14 @@ void HtmlGenerator::generateDetailedQmlMember(const Node *node, while (p != qpgn->childNodes().end()) { if ((*p)->type() == Node::QmlProperty) { qpn = static_cast<const QmlPropertyNode*>(*p); - out() << "<tr><td>"; + + if (++numTableRows % 2 == 1) + out() << "<tr class=\"odd\">"; + else + out() << "<tr class=\"even\">"; + + out() << "<td>"; + //out() << "<tr><td>"; // old out() << "<a name=\"" + refForNode(qpn) + "\"></a>"; if (!qpn->isWritable()) out() << "<span class=\"qmlreadonly\">read-only</span>"; @@ -4436,7 +4464,12 @@ void HtmlGenerator::generateDetailedQmlMember(const Node *node, const FunctionNode* qsn = static_cast<const FunctionNode*>(node); out() << "<div class=\"qmlproto\">"; out() << "<table class=\"qmlname\">"; - out() << "<tr><td>"; + //out() << "<tr>"; + if (++numTableRows % 2 == 1) + out() << "<tr class=\"odd\">"; + else + out() << "<tr class=\"even\">"; + out() << "<td>"; out() << "<a name=\"" + refForNode(qsn) + "\"></a>"; generateSynopsis(qsn,relative,marker,CodeMarker::Detailed,false); //generateQmlItem(qsn,relative,marker,false); @@ -4448,7 +4481,12 @@ void HtmlGenerator::generateDetailedQmlMember(const Node *node, const FunctionNode* qmn = static_cast<const FunctionNode*>(node); out() << "<div class=\"qmlproto\">"; out() << "<table class=\"qmlname\">"; - out() << "<tr><td>"; + //out() << "<tr>"; + if (++numTableRows % 2 == 1) + out() << "<tr class=\"odd\">"; + else + out() << "<tr class=\"even\">"; + out() << "<td>"; out() << "<a name=\"" + refForNode(qmn) + "\"></a>"; generateSynopsis(qmn,relative,marker,CodeMarker::Detailed,false); out() << "</td></tr>"; |