From 9cd2a03b09cbe4b024304b1d5d761b464c6c05e4 Mon Sep 17 00:00:00 2001 From: aavit Date: Fri, 7 May 2010 10:12:07 +0200 Subject: my changes --- dist/changes-4.7.0 | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) 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 * -- cgit v0.12 From f5366aea8594946e78106c5f93ecb2d47f121d32 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Fri, 7 May 2010 10:00:28 +0200 Subject: QUrl::fromLocalFile: fix silly mistake: it's fromNativeSeparators, not to --- src/corelib/io/qurl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/io/qurl.cpp b/src/corelib/io/qurl.cpp index 7b5bfed..67119b5 100644 --- a/src/corelib/io/qurl.cpp +++ b/src/corelib/io/qurl.cpp @@ -5985,7 +5985,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('/')) { -- cgit v0.12 From aebc59dde62651bbe60af626f289a587d475e73a Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Fri, 7 May 2010 10:19:25 +0200 Subject: tst_qxmlquery: Fix misuse of absolute paths as URLs Reviewed-By: Peter Hartmann --- tests/auto/qxmlquery/tst_qxmlquery.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) 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)); } -- cgit v0.12 From 070a3dbbb368f3e1b817a5ecff15127302458e7a Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Fri, 7 May 2010 11:54:47 +0200 Subject: Add some debugging (disabled) to QUrl::resolved --- src/corelib/io/qurl.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/corelib/io/qurl.cpp b/src/corelib/io/qurl.cpp index 67119b5..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; } -- cgit v0.12 From 91337cb62bca653c9df7e8b8f43f451facc1efb8 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Fri, 7 May 2010 11:56:50 +0200 Subject: QtDeclarative: RFC 3986 requires schemes to be considered case-insensitively Reviewed-By: Alan Alpert --- src/declarative/qml/qdeclarativecompositetypemanager.cpp | 2 +- src/declarative/qml/qdeclarativeengine.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/declarative/qml/qdeclarativecompositetypemanager.cpp b/src/declarative/qml/qdeclarativecompositetypemanager.cpp index 0eb7e1b..b0c9a43 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(); 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(); -- cgit v0.12 From 694822cbe757f2b742740f593319337127b04d17 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Fri, 7 May 2010 11:59:06 +0200 Subject: QtDeclarative: avoid waiting for a network load on URIs with empty schemes. The proper fix would be to have QNetworkAccessManager notify immediately that this load cannot work (and it knows it can't work). Then QtDeclarative can simply check what QNAM found. Reviewed-By: Alan Alpert --- .../qml/qdeclarativecompositetypemanager.cpp | 37 +++++++++++++--------- 1 file changed, 22 insertions(+), 15 deletions(-) diff --git a/src/declarative/qml/qdeclarativecompositetypemanager.cpp b/src/declarative/qml/qdeclarativecompositetypemanager.cpp index b0c9a43..625356c 100644 --- a/src/declarative/qml/qdeclarativecompositetypemanager.cpp +++ b/src/declarative/qml/qdeclarativecompositetypemanager.cpp @@ -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) { -- cgit v0.12 From 14fdf300795032b21fe51a256b5b22d3c14ca301 Mon Sep 17 00:00:00 2001 From: Morten Engvoldsen Date: Fri, 7 May 2010 13:20:14 +0200 Subject: Doc: Chages to search feature, css and table order Changes the search results Fixed table css Added odd&even classes to tables generated by the thmlgenerator Reviewed-by: Morten Engvoldsen --- doc/src/template/scripts/functions.js | 7 ++-- doc/src/template/style/style.css | 29 ++++++++++++++--- tools/qdoc3/htmlgenerator.cpp | 60 ++++++++++++++++++++++++++++------- 3 files changed, 78 insertions(+), 18 deletions(-) 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('
  • no result
  • ');$('#ul001 li').css('display','block');} - if(articleCount == 0){$('#ul002').prepend('
  • no result
  • ');$('#ul002 li').css('display','block');} - if(exampleCount == 0){$('#ul003').prepend('
  • no result
  • ');$('#ul003 li').css('display','block');} + if(lookupCount == 0){$('#ul001').prepend('
  • Found no result
  • ');$('#ul001 li').css('display','block');} + if(articleCount == 0){$('#ul002').prepend('
  • Found no result
  • ');$('#ul002 li').css('display','block');} + if(exampleCount == 0){$('#ul003').prepend('
  • Found no result
  • ');$('#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/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() << "" - << "" + out() << "
    Constant
    "; + // << "" + if (++numTableRows % 2 == 1) + out() << ""; + else + out() << ""; + + out() << "" << "" << "\n"; } @@ -1093,7 +1099,7 @@ int HtmlGenerator::generateAtom(const Atom *atom, } if (!atom->string().isEmpty()) { if (atom->string().contains("%")) - out() << "
    ConstantValueDescription
    string() << "\">\n "; + out() << "
    \n "; // width=\"" << atom->string() << "\">\n "; else { out() << "
    \n"; } @@ -2456,7 +2462,13 @@ void HtmlGenerator::generateCompactList(const Node *relative, out() << "
    \n"; for (k = 0; k < numRows; k++) { - out() << "\n"; + if (++numTableRows % 2 == 1) + out() << ""; + else + out() << ""; + //break; + +// out() << "\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() << "
    \n" - << "
    "; + out() << "\n"; + if (++numTableRows % 2 == 1) + out() << ""; + else + out() << ""; + +// << "
    "; out() << "
      \n"; int i = 0; @@ -4367,8 +4384,12 @@ void HtmlGenerator::generateQmlSummary(const Section& section, twoColumn = (count >= 5); } if (twoColumn) - out() << "\n" - << "
      "; + out() << "\n"; + if (++numTableRows % 2 == 1) + out() << ""; + else + out() << ""; + // << ""; + else + out() << ""; + + out() << "
      "; out() << "
        \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(*p); - out() << "
      "; + + if (++numTableRows % 2 == 1) + out() << "
      "; + //out() << "
      "; // old out() << ""; if (!qpn->isWritable()) out() << "read-only"; @@ -4436,7 +4464,12 @@ void HtmlGenerator::generateDetailedQmlMember(const Node *node, const FunctionNode* qsn = static_cast(node); out() << "
      "; out() << ""; - out() << ""; + if (++numTableRows % 2 == 1) + out() << ""; + else + out() << ""; + out() << "
      "; + //out() << "
      "; out() << ""; 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(node); out() << "
      "; out() << ""; - out() << ""; + if (++numTableRows % 2 == 1) + out() << ""; + else + out() << ""; + out() << ""; -- cgit v0.12
      "; + //out() << "
      "; out() << ""; generateSynopsis(qmn,relative,marker,CodeMarker::Detailed,false); out() << "